mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Use unique variables for cc65 toolchain.
Originally I used the usual variables (like $(CC) and $(CFLAGS) ) but after all this doesn't make sense as any predefined values and/or user defined settings can only be wrong.
This commit is contained in:
parent
b0dd6c614f
commit
5ed1fac0d6
@ -67,7 +67,8 @@ clean:
|
|||||||
|
|
||||||
else # TARGET
|
else # TARGET
|
||||||
|
|
||||||
CFLAGS += -Osir -W error
|
CA65FLAGS =
|
||||||
|
CC65FLAGS = -Osir -W error
|
||||||
|
|
||||||
EXTZP = cbm510 \
|
EXTZP = cbm510 \
|
||||||
cbm610 \
|
cbm610 \
|
||||||
@ -178,7 +179,7 @@ $$($1_OBJS): | $$($1_OBJDIR)
|
|||||||
|
|
||||||
$$($1_DRVPAT): $$($1_OBJPAT) $$(ZPOBJ) | $$($1_DRVDIR)
|
$$($1_DRVPAT): $$($1_OBJPAT) $$(ZPOBJ) | $$($1_DRVDIR)
|
||||||
@echo $$(TARGET) - $$(@F)
|
@echo $$(TARGET) - $$(@F)
|
||||||
@$$(LD) -o $$@ -t module $$^
|
@$$(LD65) -o $$@ -t module $$^
|
||||||
|
|
||||||
$$($1_OBJDIR) $$($1_DRVDIR):
|
$$($1_OBJDIR) $$($1_DRVDIR):
|
||||||
@$$(call MKDIR,$$@)
|
@$$(call MKDIR,$$@)
|
||||||
@ -187,8 +188,8 @@ $(TARGET): $$($1_DRVS)
|
|||||||
|
|
||||||
$$($1_STCPAT): $$($1_DRVPAT)
|
$$($1_STCPAT): $$($1_DRVPAT)
|
||||||
@echo $$(TARGET) - $$(<F)
|
@echo $$(TARGET) - $$(<F)
|
||||||
@$$(CO) -o $$(@:.o=.s) --code-label _$$(subst -,_,$$(subst .,_,$$(<F))) $$<
|
@$$(CO65) -o $$(@:.o=.s) --code-label _$$(subst -,_,$$(subst .,_,$$(<F))) $$<
|
||||||
@$$(CA) -t $$(TARGET) -o $$@ $$(@:.o=.s)
|
@$$(CA65) -t $$(TARGET) -o $$@ $$(@:.o=.s)
|
||||||
|
|
||||||
OBJS += $$($1_STCS)
|
OBJS += $$($1_STCS)
|
||||||
|
|
||||||
@ -200,11 +201,11 @@ endef
|
|||||||
|
|
||||||
$(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype))))
|
$(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype))))
|
||||||
|
|
||||||
AR := $(if $(wildcard ../bin/ar65*),../bin/ar65,ar65)
|
AR65 := $(if $(wildcard ../bin/ar65*),../bin/ar65,ar65)
|
||||||
CA := $(if $(wildcard ../bin/ca65*),../bin/ca65,ca65)
|
CA65 := $(if $(wildcard ../bin/ca65*),../bin/ca65,ca65)
|
||||||
CC := $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65)
|
CC65 := $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65)
|
||||||
CO := $(if $(wildcard ../bin/co65*),../bin/co65,co65)
|
CO65 := $(if $(wildcard ../bin/co65*),../bin/co65,co65)
|
||||||
LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
|
LD65 := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
|
||||||
|
|
||||||
export CC65_HOME := $(abspath ..)
|
export CC65_HOME := $(abspath ..)
|
||||||
|
|
||||||
@ -213,7 +214,7 @@ export CC65_HOME := $(abspath ..)
|
|||||||
define ASSEMBLE_recipe
|
define ASSEMBLE_recipe
|
||||||
|
|
||||||
$(if $(TRAVIS),,@echo $(TARGET) - $<)
|
$(if $(TRAVIS),,@echo $(TARGET) - $<)
|
||||||
@$(CA) -t $(TARGET) $(AFLAGS) --create-dep $(@:.o=.d) -o $@ $<
|
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -222,8 +223,8 @@ endef
|
|||||||
define COMPILE_recipe
|
define COMPILE_recipe
|
||||||
|
|
||||||
$(if $(TRAVIS),,@echo $(TARGET) - $<)
|
$(if $(TRAVIS),,@echo $(TARGET) - $<)
|
||||||
@$(CC) -t $(TARGET) $(CFLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
|
@$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
|
||||||
@$(CA) -t $(TARGET) -o $@ $(@:.o=.s)
|
@$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -237,10 +238,10 @@ endef
|
|||||||
|
|
||||||
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
||||||
@echo $(TARGET) - $(@F)
|
@echo $(TARGET) - $(@F)
|
||||||
@$(CA) -t $(TARGET) $(AFLAGS) -o $@ $<
|
@$(CA65) -t $(TARGET) $(CA65FLAGS) -o $@ $<
|
||||||
|
|
||||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||||
$(AR) a $@ $?
|
$(AR65) a $@ $?
|
||||||
|
|
||||||
../wrk/$(TARGET) ../lib ../targetutil:
|
../wrk/$(TARGET) ../lib ../targetutil:
|
||||||
@$(call MKDIR,$@)
|
@$(call MKDIR,$@)
|
||||||
|
@ -4,6 +4,6 @@ DEPS += ../wrk/$(TARGET)/loader.d
|
|||||||
$(ASSEMBLE_recipe)
|
$(ASSEMBLE_recipe)
|
||||||
|
|
||||||
../targetutil/loader.system: ../wrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../targetutil
|
../targetutil/loader.system: ../wrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../targetutil
|
||||||
$(LD) -o $@ -C $(filter %.cfg,$^) $(filter-out %.cfg,$^)
|
$(LD65) -o $@ -C $(filter %.cfg,$^) $(filter-out %.cfg,$^)
|
||||||
|
|
||||||
$(TARGET): ../targetutil/loader.system
|
$(TARGET): ../targetutil/loader.system
|
||||||
|
@ -13,4 +13,4 @@
|
|||||||
# DYNAMIC_DD - determine default disk device at runtime (SpartaDOS only)
|
# DYNAMIC_DD - determine default disk device at runtime (SpartaDOS only)
|
||||||
# needs DEFAULT_DEVICE to be defined, otherwise no effect
|
# needs DEFAULT_DEVICE to be defined, otherwise no effect
|
||||||
|
|
||||||
AFLAGS += -D NUMDRVS=4 -D LINEBUF=80 -D UCASE_FILENAME=1 -D DEFAULT_DEVICE=1 -D DYNAMIC_DD=1
|
CA65FLAGS += -D NUMDRVS=4 -D LINEBUF=80 -D UCASE_FILENAME=1 -D DEFAULT_DEVICE=1 -D DYNAMIC_DD=1
|
||||||
|
@ -1 +1 @@
|
|||||||
AFLAGS += -I geos-apple -I geos-common
|
CA65FLAGS += -I geos-apple -I geos-common
|
||||||
|
@ -9,6 +9,6 @@ DEPS += ../wrk/$(TARGET)/convert.d
|
|||||||
@$(MAKE) --no-print-directory apple2enh
|
@$(MAKE) --no-print-directory apple2enh
|
||||||
|
|
||||||
../targetutil/convert.system: ../wrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../targetutil
|
../targetutil/convert.system: ../wrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../targetutil
|
||||||
$(LD) -o $@ -C apple2enh-system.cfg $^
|
$(LD65) -o $@ -C apple2enh-system.cfg $^
|
||||||
|
|
||||||
$(TARGET): ../targetutil/convert.system
|
$(TARGET): ../targetutil/convert.system
|
||||||
|
@ -1 +1 @@
|
|||||||
AFLAGS += -I geos-cbm -I geos-common
|
CA65FLAGS += -I geos-cbm -I geos-common
|
||||||
|
Loading…
x
Reference in New Issue
Block a user