mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Merge pull request #456 from greg-king5/make-dep
Add a makefile dependency for the libraries' "extra" files.
This commit is contained in:
commit
7c560bef87
@ -196,6 +196,7 @@ DEPS = $(OBJS:.o=.d)
|
|||||||
EXTRA_SRCPAT = $(SRCDIR)/extra/%.s
|
EXTRA_SRCPAT = $(SRCDIR)/extra/%.s
|
||||||
EXTRA_OBJPAT = ../lib/$(TARGET)-%.o
|
EXTRA_OBJPAT = ../lib/$(TARGET)-%.o
|
||||||
EXTRA_OBJS := $(patsubst $(EXTRA_SRCPAT),$(EXTRA_OBJPAT),$(wildcard $(SRCDIR)/extra/*.s))
|
EXTRA_OBJS := $(patsubst $(EXTRA_SRCPAT),$(EXTRA_OBJPAT),$(wildcard $(SRCDIR)/extra/*.s))
|
||||||
|
DEPS += $(EXTRA_OBJS:../lib/%.o=../libwrk/$(TARGET)/%.d)
|
||||||
|
|
||||||
ZPOBJ = ../libwrk/$(TARGET)/zeropage.o
|
ZPOBJ = ../libwrk/$(TARGET)/zeropage.o
|
||||||
ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP)))
|
ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP)))
|
||||||
@ -279,9 +280,9 @@ endef # COMPILE_recipe
|
|||||||
../libwrk/$(TARGET)/%.o: %.c | ../libwrk/$(TARGET)
|
../libwrk/$(TARGET)/%.o: %.c | ../libwrk/$(TARGET)
|
||||||
$(COMPILE_recipe)
|
$(COMPILE_recipe)
|
||||||
|
|
||||||
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
|
||||||
@echo $(TARGET) - $(<F)
|
@echo $(TARGET) - $(<F)
|
||||||
@$(CA65) -t $(TARGET) $(CA65FLAGS) -o $@ $<
|
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<
|
||||||
|
|
||||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||||
$(AR65) a $@ $?
|
$(AR65) a $@ $?
|
||||||
|
Loading…
Reference in New Issue
Block a user