mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Merge pull request #287 from silverdr/target_goodies
moved output of target utils and drivers to separate directory
This commit is contained in:
commit
89329f1519
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,13 +1,9 @@
|
||||
/bin/
|
||||
/emd/
|
||||
/html/
|
||||
/info/
|
||||
/joy/
|
||||
/lib/
|
||||
/libwrk/
|
||||
/mou/
|
||||
/ser/
|
||||
/targetutil/
|
||||
/target/
|
||||
/testwrk/
|
||||
/tgi/
|
||||
/wrk/
|
||||
cc65.zip
|
||||
|
1
Makefile
1
Makefile
@ -6,6 +6,7 @@ all mostlyclean clean install zip:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C samples --no-print-directory $@
|
||||
|
||||
avail unavail bin:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
@ -33,15 +33,17 @@ install:
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
ifeq ($(wildcard ../html),../html)
|
||||
$(INSTALL) -d $(DESTDIR)$(htmldir)
|
||||
$(INSTALL) -m644 ../html/*.* $(DESTDIR)$(htmldir)
|
||||
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
|
||||
endif
|
||||
ifeq ($(wildcard ../info),../info)
|
||||
$(INSTALL) -d $(DESTDIR)$(infodir)
|
||||
$(INSTALL) -m644 ../info/*.* $(DESTDIR)$(infodir)
|
||||
$(INSTALL) -m0644 ../info/*.* $(DESTDIR)$(infodir)
|
||||
endif
|
||||
|
||||
zip:
|
||||
ifneq "$(wildcard ../html)" ""
|
||||
@cd .. && zip cc65 html/*.*
|
||||
endif
|
||||
|
||||
doc: html info
|
||||
|
||||
|
@ -241,7 +241,7 @@ The easiest (and for really large programs in fact the only) way to have a cc65
|
||||
program use the memory from $800 to $2000 is to link it as binary
|
||||
(as opposed to system) program using the default linker configuration
|
||||
<ref id="apple-def-cfg" name="apple2.cfg"> with <tt/__HIMEM__/ set to $BF00
|
||||
and load it with the targetutil LOADER.SYSTEM. The program then works like a system
|
||||
and load it with the LOADER.SYSTEM utility. The program then works like a system
|
||||
program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
|
@ -241,7 +241,7 @@ The easiest (and for really large programs in fact the only) way to have a cc65
|
||||
program use the memory from $800 to $2000 is to link it as binary
|
||||
(as opposed to system) program using the default linker configuration
|
||||
<ref id="apple-def-cfg" name="apple2enh.cfg"> with <tt/__HIMEM__/set to $BF00
|
||||
and load it with the targetutil LOADER.SYSTEM. The program then works like a system
|
||||
and load it with the LOADER.SYSTEM utility. The program then works like a system
|
||||
program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
|
@ -229,8 +229,8 @@ for C and assembly language programs.
|
||||
The size of a cassette boot file is restricted to 32K. Larger programs
|
||||
would need to be split in more parts and the parts to be loaded manually.
|
||||
|
||||
To write the generated file to a cassette, a utility to run
|
||||
on an Atari is provided in the <tt/targetutil/ directory (<tt/w2cas.com/).
|
||||
To write the generated file to a cassette, a utility (<tt/w2cas.com/) to run
|
||||
on an Atari is provided in the <tt/util/ directory of <tt/atari/ target dir.
|
||||
|
||||
<sect1><tt/atarixl/ config files<p>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
@ -38,12 +39,12 @@ DRVTYPES = emd \
|
||||
tgi
|
||||
|
||||
OUTPUTDIRS := lib \
|
||||
$(DRVTYPES) \
|
||||
targetutil \
|
||||
asminc \
|
||||
cfg \
|
||||
include \
|
||||
$(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)))
|
||||
$(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)))\
|
||||
$(subst ../,,$(wildcard ../target/*/drv/*))\
|
||||
$(subst ../,,$(wildcard ../target/*/util))\
|
||||
|
||||
.PHONY: all mostlyclean clean install zip lib $(TARGETS)
|
||||
|
||||
@ -77,7 +78,7 @@ mostlyclean:
|
||||
$(call RMDIR,../libwrk)
|
||||
|
||||
clean:
|
||||
$(call RMDIR,../libwrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES)))
|
||||
$(call RMDIR,../libwrk ../lib ../target)
|
||||
|
||||
ifdef CMD_EXE
|
||||
|
||||
@ -91,7 +92,7 @@ define INSTALL_recipe
|
||||
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/$(dir)
|
||||
$(INSTALL) -m644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)
|
||||
$(INSTALL) -m0644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)
|
||||
|
||||
endef # INSTALL_recipe
|
||||
|
||||
@ -212,7 +213,7 @@ define DRVTYPE_template
|
||||
$1_SRCDIR = $$(SRCDIR)/$1
|
||||
$1_STCDIR = ../libwrk/$$(TARGET)
|
||||
$1_DYNDIR = ../libwrk/$$(TARGET)/$1
|
||||
$1_DRVDIR = ../$1
|
||||
$1_DRVDIR = ../target/$$(TARGET)/drv/$1
|
||||
|
||||
$1_SRCPAT = $$($1_SRCDIR)/$$(OBJPFX)%.s
|
||||
$1_STCPAT = $$($1_STCDIR)/$$(OBJPFX)%-$1.o
|
||||
@ -283,7 +284,7 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||
$(AR65) a $@ $?
|
||||
|
||||
../libwrk/$(TARGET) ../lib ../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)
|
||||
|
||||
../targetutil/loader.system: ../libwrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../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): ../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)
|
||||
|
||||
../targetutil/w2cas.com: ../libwrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil
|
||||
../target/$(TARGET)/util/w2cas.com: ../libwrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../target/$(TARGET)/util
|
||||
$(LD65) -o $@ -t $(TARGET) $^
|
||||
|
||||
$(TARGET): ../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
|
||||
|
||||
../targetutil/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../targetutil
|
||||
../target/$(TARGET)/util/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../target/$(TARGET)/util
|
||||
$(LD65) -o $@ -C apple2enh-system.cfg $^
|
||||
|
||||
$(TARGET): ../targetutil/convert.system
|
||||
$(TARGET): ../target/$(TARGET)/util/convert.system
|
||||
|
@ -1,4 +1,5 @@
|
||||
../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,16 +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
|
||||
installdir = /usr/lib/cc65
|
||||
ifneq "$(wildcard /usr/local/lib/cc65)" ""
|
||||
MOUS = /usr/local/lib/cc65/mou/$(SYS)*.mou
|
||||
TGI = /usr/local/lib/cc65/tgi/$(SYS)*.tgi
|
||||
installdir = /usr/local/lib/cc65
|
||||
endif
|
||||
ifneq "$(wildcard /opt/local/share/cc65)" ""
|
||||
installdir = /opt/local/share/cc65
|
||||
endif
|
||||
ifdef CC65_HOME
|
||||
MOUS = $(CC65_HOME)/mou/$(SYS)*.mou
|
||||
TGI = $(CC65_HOME)/tgi/$(SYS)*.tgi
|
||||
installdir = $(CC65_HOME)
|
||||
endif
|
||||
|
||||
MOUS = $(installdir)/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = $(installdir)/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
CLIB = --lib $(SYS).lib
|
||||
CL = cl65
|
||||
CC = cc65
|
||||
@ -31,8 +34,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
|
||||
@ -105,8 +108,11 @@ EXELIST = ascii \
|
||||
# --------------------------------------------------------------------------
|
||||
# Rules to make the binaries
|
||||
|
||||
.PHONY: all
|
||||
all: $(EXELIST)
|
||||
.PHONY: all samples
|
||||
all:
|
||||
|
||||
samples:
|
||||
$(EXELIST)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Overlay rules. Overlays need special ld65 configuration files. Also, the
|
||||
@ -134,9 +140,36 @@ samples.d64: all
|
||||
$(C1541) -attach $@ -write $$mod > /dev/null || exit $$?;\
|
||||
done
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Installation rules
|
||||
|
||||
INSTALL = install
|
||||
samplesdir = $(prefix)/share/cc65
|
||||
.PHONY: install
|
||||
install:
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
$(INSTALL) -d $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -d $(DESTDIR)$(samplesdir)/geos
|
||||
$(INSTALL) -d $$(DESTDIR)$(samplesdir)/tutorial
|
||||
$(INSTALL) -m0644 *.* $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 README $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 Makefile $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 geos/*.* $(DESTDIR)$(samplesdir)/geos
|
||||
$(INSTALL) -m0644 tutorial/*.* $(DESTDIR)$(samplesdir)/tutorial
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Packaging rules
|
||||
|
||||
.PHONY: zip
|
||||
zip:
|
||||
@cd .. && zip -r cc65 samples/
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Clean-up rules
|
||||
|
||||
.PHONY: mostlyclean
|
||||
mostlyclean:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) *~ *.map *.o *.s *.lbl
|
||||
|
Loading…
x
Reference in New Issue
Block a user