diff --git a/Makefile b/Makefile index 6360636e..8ddf1e32 100644 --- a/Makefile +++ b/Makefile @@ -122,8 +122,10 @@ JANET_BOOT_SOURCES=src/boot/array_test.c \ src/boot/number_test.c \ src/boot/system_test.c \ src/boot/table_test.c +JANET_BOOT_HEADERS=src/boot/tests.h JANET_MAINCLIENT_SOURCES=src/mainclient/line.c src/mainclient/main.c +JANET_MAINCLIENT_HEADERS=src/mainclient/line.h JANET_WEBCLIENT_SOURCES=src/webclient/main.c @@ -134,6 +136,8 @@ JANET_WEBCLIENT_SOURCES=src/webclient/main.c JANET_BOOT_OBJECTS=$(patsubst src/%.c,build/%.boot.o,$(JANET_CORE_SOURCES) $(JANET_BOOT_SOURCES)) \ build/boot.gen.o +$(JANET_BOOT_OBJECTS): $(JANET_BOOT_HEADERS) + build/%.boot.o: src/%.c $(JANET_HEADERS) $(JANET_LOCAL_HEADERS) $(CC) $(CFLAGS) -DJANET_BOOTSTRAP -o $@ -c $< @@ -151,6 +155,8 @@ build/core_image.c: build/janet_boot JANET_CORE_OBJECTS=$(patsubst src/%.c,build/%.o,$(JANET_CORE_SOURCES)) build/core_image.o JANET_MAINCLIENT_OBJECTS=$(patsubst src/%.c,build/%.o,$(JANET_MAINCLIENT_SOURCES)) +$(JANET_MAINCLIENT_OBJECTS): $(JANET_MAINCLIENT_HEADERS) + # Compile the core image generated by the bootstrap build build/core_image.o: build/core_image.c $(JANET_HEADERS) $(JANET_LOCAL_HEADERS) $(CC) $(CFLAGS) -o $@ -c $<