mirror of
https://github.com/cc65/cc65.git
synced 2025-01-23 13:30:01 +00:00
directory structure changed from driver-centric to target-centric
This commit is contained in:
parent
93f55c274b
commit
ba10c74a7a
@ -1,3 +1,4 @@
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
@ -37,11 +38,8 @@ DRVTYPES = emd \
|
||||
ser \
|
||||
tgi
|
||||
|
||||
DRVOUTPUTDIRS := $(foreach drvtype,$(DRVTYPES),goodies/drivers/$(drvtype))
|
||||
|
||||
OUTPUTDIRS := lib \
|
||||
$(DRVOUTPUTDIRS) \
|
||||
goodies/targetutil \
|
||||
target \
|
||||
asminc \
|
||||
cfg \
|
||||
include \
|
||||
@ -82,8 +80,8 @@ mostlyclean:
|
||||
# Transitional line active. Final line commented out below in order to
|
||||
# allow some time for transition between the directory structures
|
||||
clean:
|
||||
$(call RMDIR,../libwrk ../lib ../targetutil ../goodies $(addprefix ../,$(DRVTYPES)))
|
||||
# $(call RMDIR,../libwrk ../lib ../goodies)
|
||||
$(call RMDIR,../libwrk ../lib ../targetutil ../target $(addprefix ../,$(DRVTYPES)))
|
||||
# $(call RMDIR,../libwrk ../lib ../target)
|
||||
|
||||
ifdef CMD_EXE
|
||||
|
||||
@ -218,7 +216,7 @@ define DRVTYPE_template
|
||||
$1_SRCDIR = $$(SRCDIR)/$1
|
||||
$1_STCDIR = ../libwrk/$$(TARGET)
|
||||
$1_DYNDIR = ../libwrk/$$(TARGET)/$1
|
||||
$1_DRVDIR = ../goodies/drivers/$1
|
||||
$1_DRVDIR = ../target/$$(TARGET)/drv/$1
|
||||
|
||||
$1_SRCPAT = $$($1_SRCDIR)/$$(OBJPFX)%.s
|
||||
$1_STCPAT = $$($1_STCDIR)/$$(OBJPFX)%-$1.o
|
||||
@ -289,7 +287,7 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||
$(AR65) a $@ $?
|
||||
|
||||
../libwrk/$(TARGET) ../lib ../goodies/targetutil:
|
||||
../libwrk/$(TARGET) ../lib ../target/$(TARGET)/util:
|
||||
@$(call MKDIR,$@)
|
||||
|
||||
$(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib
|
||||
|
@ -3,7 +3,7 @@ DEPS += ../libwrk/$(TARGET)/loader.d
|
||||
../libwrk/$(TARGET)/loader.o: $(SRCDIR)/targetutil/loader.s | ../libwrk/$(TARGET)
|
||||
$(ASSEMBLE_recipe)
|
||||
|
||||
../goodies/targetutil/loader.system: ../libwrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../goodies/targetutil
|
||||
../target/$(TARGET)/util/loader.system: ../libwrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../target/$(TARGET)/util
|
||||
$(LD65) -o $@ -C $(filter %.cfg,$^) $(filter-out %.cfg,$^)
|
||||
|
||||
$(TARGET): ../goodies/targetutil/loader.system
|
||||
$(TARGET): ../target/$(TARGET)/util/loader.system
|
||||
|
@ -3,7 +3,7 @@ DEPS += ../libwrk/$(TARGET)/w2cas.d
|
||||
../libwrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../libwrk/$(TARGET)
|
||||
$(COMPILE_recipe)
|
||||
|
||||
../goodies/targetutil/w2cas.com: ../libwrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../goodies/targetutil
|
||||
../target/$(TARGET)/util/w2cas.com: ../libwrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../target/$(TARGET)/util
|
||||
$(LD65) -o $@ -t $(TARGET) $^
|
||||
|
||||
$(TARGET): ../goodies/targetutil/w2cas.com
|
||||
$(TARGET): ../target/$(TARGET)/util/w2cas.com
|
||||
|
@ -8,7 +8,7 @@ DEPS += ../libwrk/$(TARGET)/convert.d
|
||||
../lib/apple2enh.lib:
|
||||
@$(MAKE) --no-print-directory apple2enh
|
||||
|
||||
../goodies/targetutil/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../goodies/targetutil
|
||||
../target/$(TARGET)/util/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../target/$(TARGET)/util
|
||||
$(LD65) -o $@ -C apple2enh-system.cfg $^
|
||||
|
||||
$(TARGET): ../goodies/targetutil/convert.system
|
||||
$(TARGET): ../target/$(TARGET)/util/convert.system
|
||||
|
@ -1,4 +1,4 @@
|
||||
../goodies/drivers/tgi/nes-64-56-2.tgi: ../libwrk/nes/clrscr.o \
|
||||
../target/nes/drv/tgi/nes-64-56-2.tgi: ../libwrk/nes/clrscr.o \
|
||||
../libwrk/nes/cputc.o \
|
||||
../libwrk/nes/get_tv.o \
|
||||
../libwrk/nes/gotoxy.o \
|
||||
|
@ -12,15 +12,19 @@ SYS = c64
|
||||
# source tree; otherwise, use the "install" directories.
|
||||
ifeq "$(wildcard ../src)" ""
|
||||
# No source tree
|
||||
MOUS = /usr/lib/cc65/mou/$(SYS)*.mou
|
||||
TGI = /usr/lib/cc65/tgi/$(SYS)*.tgi
|
||||
MOUS = /usr/lib/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /usr/lib/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
ifneq "$(wildcard /usr/local/lib/cc65)" ""
|
||||
MOUS = /usr/local/lib/cc65/mou/$(SYS)*.mou
|
||||
TGI = /usr/local/lib/cc65/tgi/$(SYS)*.tgi
|
||||
MOUS = /usr/local/lib/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /usr/local/lib/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
endif
|
||||
ifneq "$(wildcard /opt/local/share/cc65)" ""
|
||||
MOUS = /opt/local/share/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /opt/local/share/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
endif
|
||||
ifdef CC65_HOME
|
||||
MOUS = $(CC65_HOME)/mou/$(SYS)*.mou
|
||||
TGI = $(CC65_HOME)/tgi/$(SYS)*.tgi
|
||||
MOUS = $(CC65_HOME)/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = $(CC65_HOME)/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
endif
|
||||
CLIB = --lib $(SYS).lib
|
||||
CL = cl65
|
||||
@ -31,8 +35,8 @@ LD = ld65
|
||||
else
|
||||
# "samples/" is a part of a complete source tree.
|
||||
export CC65_HOME := $(abspath ..)
|
||||
MOUS = ../mou/$(SYS)*.mou
|
||||
TGI = ../tgi/$(SYS)*.tgi
|
||||
MOUS = ../target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = ../target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
CLIB = ../lib/$(SYS).lib
|
||||
CL = ../bin/cl65
|
||||
CC = ../bin/cc65
|
||||
|
Loading…
x
Reference in New Issue
Block a user