mirror of
https://github.com/cc65/cc65.git
synced 2025-01-13 09:31:53 +00:00
Added support for building 'extra' object files.
This commit is contained in:
parent
b69727f47f
commit
bf59515a9e
@ -125,6 +125,10 @@ OBJS := $(addprefix ../wrk/$(TARGET)/,$(sort $(notdir $(OBJS))))
|
||||
|
||||
DEPS = $(OBJS:.o=.d)
|
||||
|
||||
EXTRA_SRCPAT = $(firstword $(DIRS))/extra/%.s
|
||||
EXTRA_OBJPAT = ../lib/$(TARGET)-%.o
|
||||
EXTRA_OBJS := $(patsubst $(EXTRA_SRCPAT),$(EXTRA_OBJPAT),$(wildcard $(firstword $(DIRS))/extra/*.s))
|
||||
|
||||
ZPOBJ = ../wrk/$(TARGET)/zeropage.o
|
||||
ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP)))
|
||||
ZPOBJ += ../wrk/$(TARGET)/extzp.o
|
||||
@ -199,13 +203,17 @@ LD = $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
|
||||
../wrk/$(TARGET):
|
||||
@$(call MKDIR,$@)
|
||||
|
||||
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
||||
@echo $(TARGET) - $<
|
||||
@$(CA) -t $(TARGET) $(AFLAGS) -o $@ $<
|
||||
|
||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||
$(AR) a $@ $?
|
||||
|
||||
../lib:
|
||||
@$(call MKDIR,$@)
|
||||
|
||||
$(TARGET): ../lib/$(TARGET).lib
|
||||
$(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user