depend on the modules each Sex unit reads
sexc writes the rule now (sex#40), so a module's change rebuilds the units that read it rather than every Sex object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
14
Makefile
14
Makefile
@@ -13,15 +13,13 @@ B = build
|
|||||||
|
|
||||||
all: $(B)/vsmv $(B)/vs-map-viewer
|
all: $(B)/vsmv $(B)/vs-map-viewer
|
||||||
|
|
||||||
# sexc writes no dependency files, and an import pastes the imported
|
# An import pastes the imported module's public forms into the
|
||||||
# module's public forms into the importer, so any Sex source may change
|
# importer, so a Sex object depends on every module it reads; sexc
|
||||||
# any Sex object.
|
# names them in a .d beside the object.
|
||||||
# TODO sex#40: depend on what each unit imports once sexc writes
|
$(B)/%.o: src/%.sex | $(B)
|
||||||
# dependency files.
|
$(SEXC) $< -c -o $@ --depfile=$(@:.o=.d) -- $(CFLAGS) $(SEX_CFLAGS) $(CPPFLAGS)
|
||||||
SEX_SRC := $(wildcard src/*.sex)
|
|
||||||
|
|
||||||
$(B)/%.o: src/%.sex $(SEX_SRC) | $(B)
|
-include $(wildcard $(B)/*.d)
|
||||||
$(SEXC) $< -c -o $@ -- $(CFLAGS) $(SEX_CFLAGS) $(CPPFLAGS)
|
|
||||||
|
|
||||||
$(B)/nk.o: src/nk.c src/nk.h | $(B)
|
$(B)/nk.o: src/nk.c src/nk.h | $(B)
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||||
|
|||||||
Reference in New Issue
Block a user