+
ifneq ($(shell echo),)
CMD_EXE = 1
endif
ser \
tgi
-DRVOUTPUTDIRS := $(foreach drvtype,$(DRVTYPES),goodies/drivers/$(drvtype))
-
OUTPUTDIRS := lib \
- $(DRVOUTPUTDIRS) \
- goodies/targetutil \
+ target \
asminc \
cfg \
include \
# 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
$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
../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
../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
../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
../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
-../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
# 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
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