From ba10c74a7a2783fea88b24c41c5b8a84afe32570 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Patrycjusz=20R=2E=20=C5=81ogiewa?= Date: Mon, 16 May 2016 19:49:43 +0200 Subject: [PATCH] directory structure changed from driver-centric to target-centric --- libsrc/Makefile | 14 ++++++-------- libsrc/apple2/targetutil/Makefile.inc | 4 ++-- libsrc/atari/targetutil/Makefile.inc | 4 ++-- libsrc/geos-apple/targetutil/Makefile.inc | 4 ++-- libsrc/nes/Makefile.inc | 16 ++++++++-------- samples/Makefile | 20 ++++++++++++-------- 6 files changed, 32 insertions(+), 30 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index ae65dc9b6..c4c1b78a7 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -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 diff --git a/libsrc/apple2/targetutil/Makefile.inc b/libsrc/apple2/targetutil/Makefile.inc index 0b8b39e1f..d9d727b0a 100644 --- a/libsrc/apple2/targetutil/Makefile.inc +++ b/libsrc/apple2/targetutil/Makefile.inc @@ -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 diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc index 42903a3ca..e78585238 100644 --- a/libsrc/atari/targetutil/Makefile.inc +++ b/libsrc/atari/targetutil/Makefile.inc @@ -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 diff --git a/libsrc/geos-apple/targetutil/Makefile.inc b/libsrc/geos-apple/targetutil/Makefile.inc index d842b4d3f..3d366f913 100644 --- a/libsrc/geos-apple/targetutil/Makefile.inc +++ b/libsrc/geos-apple/targetutil/Makefile.inc @@ -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 diff --git a/libsrc/nes/Makefile.inc b/libsrc/nes/Makefile.inc index aaebef1db..6f2e7c7d2 100644 --- a/libsrc/nes/Makefile.inc +++ b/libsrc/nes/Makefile.inc @@ -1,8 +1,8 @@ -../goodies/drivers/tgi/nes-64-56-2.tgi: ../libwrk/nes/clrscr.o \ - ../libwrk/nes/cputc.o \ - ../libwrk/nes/get_tv.o \ - ../libwrk/nes/gotoxy.o \ - ../libwrk/nes/popa.o \ - ../libwrk/nes/ppu.o \ - ../libwrk/nes/ppubuf.o \ - ../libwrk/nes/setcursor.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 \ + ../libwrk/nes/popa.o \ + ../libwrk/nes/ppu.o \ + ../libwrk/nes/ppubuf.o \ + ../libwrk/nes/setcursor.o diff --git a/samples/Makefile b/samples/Makefile index 951706ce6..0cef19798 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -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 -- 2.39.5