Merge pull request #2746 from mrdudz/bequiet
Fix -s vs QUIET in the makefiles
This commit is contained in:
20
.github/workflows/build-on-pull-request.yml
vendored
20
.github/workflows/build-on-pull-request.yml
vendored
@@ -29,29 +29,29 @@ jobs:
|
||||
run: make -j2 sorted
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: make -j2 bin USER_CFLAGS=-Werror
|
||||
run: make -j2 bin USER_CFLAGS=-Werror QUIET=1
|
||||
- name: Build the dbginfo example
|
||||
shell: bash
|
||||
run: make -j2 -C src test
|
||||
run: make -j2 -C src test QUIET=1
|
||||
- name: Build the utilities.
|
||||
shell: bash
|
||||
run: make -j2 util
|
||||
run: make -j2 util QUIET=1
|
||||
- name: Build the platform libraries.
|
||||
shell: bash
|
||||
run: make -j2 lib QUIET=1
|
||||
- name: check test that no modules use sp
|
||||
shell: bash
|
||||
run: make -j2 checksp QUIET=1
|
||||
run: make -j2 checksp QUIET=1
|
||||
- name: Run the regression tests.
|
||||
shell: bash
|
||||
run: make -j2 test QUIET=1
|
||||
- name: Test that the samples can be built.
|
||||
run: make -C samples platforms
|
||||
run: make -C samples platforms QUIET=1
|
||||
- name: Test that the targettest programs can be built.
|
||||
run: make -C targettest platforms
|
||||
run: make -C targettest platforms QUIET=1
|
||||
- name: Build the document files.
|
||||
shell: bash
|
||||
run: make -j2 doc
|
||||
run: make -j2 doc QUIET=1
|
||||
- name: Upload a documents snapshot.
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -59,8 +59,8 @@ jobs:
|
||||
path: ./html
|
||||
- name: Build 64-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
make -C src clean QUIET=1
|
||||
make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
|
||||
build_windows:
|
||||
name: Build and Test (Windows)
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
|
||||
- name: Build utils (MinGW)
|
||||
shell: cmd
|
||||
run: make -j2 util SHELL=cmd
|
||||
run: make -j2 util QUIET=1 SHELL=cmd
|
||||
|
||||
- name: Build the platform libraries (make lib)
|
||||
shell: cmd
|
||||
|
||||
20
.github/workflows/snapshot-on-push-master.yml
vendored
20
.github/workflows/snapshot-on-push-master.yml
vendored
@@ -55,8 +55,8 @@ jobs:
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: |
|
||||
make -j2 bin USER_CFLAGS=-Werror
|
||||
make -j2 util
|
||||
make -j2 bin USER_CFLAGS=-Werror QUIET=1
|
||||
make -j2 util QUIET=1
|
||||
- name: Build the platform libraries.
|
||||
shell: bash
|
||||
run: make -j2 lib QUIET=1
|
||||
@@ -65,26 +65,26 @@ jobs:
|
||||
run: make -j2 test QUIET=1
|
||||
- name: Test that the samples can be built.
|
||||
shell: bash
|
||||
run: make -j2 samples
|
||||
run: make -j2 samples QUIET=1
|
||||
- name: Remove the output from the samples tests.
|
||||
shell: bash
|
||||
run: make -C samples clean
|
||||
run: make -C samples clean QUIET=1
|
||||
- name: Remove programs in util directory
|
||||
shell: bash
|
||||
run: make -C util clean
|
||||
run: make -C util clean QUIET=1
|
||||
- name: Build the document files.
|
||||
shell: bash
|
||||
run: make -j2 doc
|
||||
run: make -j2 doc QUIET=1
|
||||
- name: Build and package 64-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
make -C src clean QUIET=1
|
||||
make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
make zip
|
||||
mv cc65.zip cc65-snapshot-win64.zip
|
||||
- name: Build and package 32-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
||||
make -C src clean QUIET=1
|
||||
make -j2 bin USER_CFLAGS=-Werror QUIET=1 CROSS_COMPILE=i686-w64-mingw32-
|
||||
make zip
|
||||
mv cc65.zip cc65-snapshot-win32.zip
|
||||
|
||||
|
||||
8
.github/workflows/windows-test-scheduled.yml
vendored
8
.github/workflows/windows-test-scheduled.yml
vendored
@@ -60,19 +60,19 @@ jobs:
|
||||
- name: Build utils (MinGW)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 util SHELL=cmd
|
||||
run: make -j2 util SHELL=cmd QUIET=1
|
||||
|
||||
- name: Build the platform libraries (make lib)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 lib QUIET=1 SHELL=cmd
|
||||
run: make -j2 lib QUIET=1 SHELL=cmd QUIET=1
|
||||
|
||||
- name: Run the regression tests (make test)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 test QUIET=1 SHELL=cmd
|
||||
run: make -j2 test QUIET=1 SHELL=cmd QUIET=1
|
||||
|
||||
- name: Test that the samples can be built (make samples)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 samples SHELL=cmd
|
||||
run: make -j2 samples SHELL=cmd QUIET=1
|
||||
|
||||
@@ -8,6 +8,16 @@ ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
CBMS = c128 \
|
||||
c16 \
|
||||
c64 \
|
||||
@@ -133,7 +143,7 @@ zip:
|
||||
$(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe))
|
||||
|
||||
$(TARGETS): | ../lib
|
||||
@$(MAKE) --no-print-directory $@
|
||||
@$(MAKE) $(PD) $@ $(PQ)
|
||||
|
||||
# ../lib must be created globally before doing lib targets in parallel
|
||||
../lib:
|
||||
@@ -252,8 +262,8 @@ $1_DYNS = $$(patsubst $$($1_SRCPAT),$$($1_DYNPAT),$$($1_SRCS))
|
||||
$1_DRVS = $$(patsubst $$($1_DYNPAT),$$($1_DRVPAT),$$($1_DYNS))
|
||||
|
||||
$$($1_STCPAT): $$($1_SRCPAT)
|
||||
@echo $$(TARGET) - $$< - static
|
||||
@$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$<
|
||||
$$(if $$(QUIET),@echo $$(TARGET) - $$< - static)
|
||||
$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$<
|
||||
|
||||
OBJS += $$($1_STCS)
|
||||
DEPS += $$($1_STCS:.o=.d)
|
||||
@@ -261,8 +271,8 @@ DEPS += $$($1_STCS:.o=.d)
|
||||
$$($1_DYNS): | $$($1_DYNDIR)
|
||||
|
||||
$$($1_DRVPAT): $$($1_DYNPAT) $$(ZPOBJ) | $$($1_DRVDIR)
|
||||
@echo $$(TARGET) - $$(<F)
|
||||
@$$(LD65) -o $$@ -t module $$^
|
||||
$$(if $$(QUIET),@echo $$(TARGET) - $$(<F))
|
||||
$$(LD65) -o $$@ -t module $$^
|
||||
|
||||
$$($1_DYNDIR) $$($1_DRVDIR):
|
||||
@$$(call MKDIR,$$@)
|
||||
@@ -284,16 +294,16 @@ export CC65_HOME := $(abspath ..)
|
||||
|
||||
define ASSEMBLE_recipe
|
||||
|
||||
$(if $(QUIET),,@echo $(TARGET) - $<)
|
||||
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
|
||||
$(if $(QUIET),@echo $(TARGET) - $<)
|
||||
$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
|
||||
|
||||
endef # ASSEMBLE_recipe
|
||||
|
||||
define COMPILE_recipe
|
||||
|
||||
$(if $(QUIET),,@echo $(TARGET) - $<)
|
||||
@$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
|
||||
@$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
|
||||
$(if $(QUIET),@echo $(TARGET) - $<)
|
||||
$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
|
||||
$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
|
||||
|
||||
endef # COMPILE_recipe
|
||||
|
||||
@@ -304,12 +314,13 @@ endef # COMPILE_recipe
|
||||
$(COMPILE_recipe)
|
||||
|
||||
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
|
||||
@echo $(TARGET) - $(<F)
|
||||
$(if $(QUIET),@echo $(TARGET) - $(<F))
|
||||
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<
|
||||
|
||||
$(EXTRA_OBJS): | ../lib
|
||||
|
||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||
$(if $(QUIET),@echo $(TARGET) - $<)
|
||||
$(AR65) a $@ $?
|
||||
|
||||
../libwrk/$(TARGET) ../target/$(TARGET)/util:
|
||||
|
||||
@@ -47,6 +47,16 @@ else
|
||||
LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
|
||||
ifdef CC65_HOME
|
||||
TARGET_PATH = $(CC65_HOME)/target
|
||||
@@ -156,10 +166,13 @@ LDFLAGS_tgidemo_atarixl = --start-addr 0x4000
|
||||
|
||||
.o:
|
||||
ifeq ($(SYS),vic20)
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib
|
||||
else ifeq ($(SYS),plus4)
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C plus4-hires.cfg -m $@.map $^ $(SYS).lib
|
||||
else
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -t $(SYS) -m $@.map $^ $(SYS).lib
|
||||
endif
|
||||
|
||||
@@ -422,7 +435,7 @@ endif
|
||||
|
||||
define SUBDIR_recipe
|
||||
|
||||
@+$(MAKE) -C $(dir) --no-print-directory $@
|
||||
@+$(MAKE) -C $(dir) $(PD) $@ $(PQ)
|
||||
|
||||
endef # SUBDIR_recipe
|
||||
|
||||
@@ -487,17 +500,23 @@ TARGETS := \
|
||||
# --------------------------------------------------------------------------
|
||||
# Rule to make the binaries for every platform
|
||||
|
||||
define TARGETDIR_recipe
|
||||
|
||||
@+$(MAKE) -C $(dir) $(PD) $(PQ)
|
||||
|
||||
endef # TARGETDIR_recipe
|
||||
|
||||
define TARGET_recipe
|
||||
|
||||
@echo making samples for: $(T)
|
||||
@$(MAKE) --no-print-directory clean SYS:=$(T)
|
||||
@$(MAKE) -j2 SYS:=$(T)
|
||||
@$(MAKE) --no-print-directory clean SYS:=$(T)
|
||||
@$(MAKE) -j2 SYS:=$(T) $(PQ)
|
||||
@$(MAKE) $(PD) clean SYS:=$(T) $(PQ)
|
||||
|
||||
endef # TARGET_recipe
|
||||
|
||||
platforms:
|
||||
$(foreach T,$(TARGETS),$(TARGET_recipe))
|
||||
$(foreach dir,$(DIRLIST),$(TARGETDIR_recipe))
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Overlay rules. Overlays need special ld65 configuration files. Also, the
|
||||
|
||||
@@ -40,6 +40,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_apple2 = \
|
||||
hgrshow \
|
||||
hgrtest \
|
||||
@@ -63,6 +71,7 @@ endif
|
||||
disk: hgr.dsk dhgr.dsk
|
||||
|
||||
hgr.dsk: hgrshow hgrtest
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
cp prodos.dsk $@
|
||||
java -jar $(AC) -as $@ hgrshow <hgrshow
|
||||
java -jar $(AC) -as $@ hgrtest <hgrtest
|
||||
@@ -75,12 +84,15 @@ hgr.dsk: hgrshow hgrtest
|
||||
java -jar $(AC) -p $@ winston.hgr bin 0x2000 <winston.hgr
|
||||
|
||||
hgrshow: hgrshow.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -Oirs -t apple2 --start-addr 0x4000 -m hgrshow.map $^
|
||||
|
||||
hgrtest: hgrtest.c werner.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -Oirs -t apple2 -C apple2-hgr.cfg -m hgrtest.map $^
|
||||
|
||||
dhgr.dsk: dhgrshow
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
cp prodos.dsk $@
|
||||
java -jar $(AC) -as $@ dhgrshow <dhgrshow
|
||||
java -jar $(AC) -p $@ catface.dhgr bin 0x2000 <catface.dhgr
|
||||
@@ -91,6 +103,7 @@ dhgr.dsk: dhgrshow
|
||||
java -jar $(AC) -p $@ venice.dhgr bin 0x2000 <venice.dhgr
|
||||
|
||||
dhgrshow: dhgrshow.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -Oirs -t apple2enh --start-addr 0x4000 -m dhgrshow.map $^
|
||||
|
||||
clean:
|
||||
|
||||
@@ -39,6 +39,14 @@ else
|
||||
SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_atari2600 = \
|
||||
hello
|
||||
|
||||
@@ -58,6 +66,7 @@ else
|
||||
endif
|
||||
|
||||
hello: hello.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o hello -m hello.map hello.c
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_atari5200 = \
|
||||
hello
|
||||
|
||||
@@ -56,6 +64,7 @@ else
|
||||
endif
|
||||
|
||||
hello: hello.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari5200 -o hello hello.c
|
||||
|
||||
clean:
|
||||
|
||||
@@ -39,6 +39,14 @@ else
|
||||
SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
|
||||
ifdef CC65_HOME
|
||||
TARGET_PATH = $(CC65_HOME)/target
|
||||
@@ -139,12 +147,16 @@ else
|
||||
endif
|
||||
|
||||
fire: fire.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o fire -m fire.map fire.c
|
||||
plasma: plasma.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o plasma -m plasma.map plasma.c
|
||||
nachtm: nachtm.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o nachtm -m nachtm.map nachtm.c
|
||||
hello: hello-asm.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
# Use separate assembler ...
|
||||
$(AS) -t $(SYS) hello-asm.s
|
||||
# ... and linker commands ...
|
||||
@@ -171,6 +183,7 @@ $(C1541) -attach $@ -write "$(subst ?,$(SPACE),$(file))" $(notdir $(file)),s >$(
|
||||
endef # D64_WRITE_SEQ_recipe
|
||||
|
||||
samples.d64: samples
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
@$(C1541) -format "samples,00" d64 $@ >$(NULLDEV)
|
||||
$(foreach file,$(EXELIST_$(SYS)),$(D64_WRITE_PRG_recipe))
|
||||
# $(foreach file,$(OVERLAYLIST),$(D64_WRITE_PRG_recipe))
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
DA := $(if $(wildcard ../../bin/da65*),../../bin/da65,da65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
CPP = cpp
|
||||
#CPPFLAGS = -DTEST_ERROR
|
||||
|
||||
@@ -56,6 +64,7 @@ $(DAIS): fixed.da
|
||||
$(DA) --sync-lines -o $@ -i $< image.bin
|
||||
|
||||
image.bin: image.s image.cfg
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t none -C image.cfg -o image.bin image.s
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_gamate = \
|
||||
nachtm.bin
|
||||
|
||||
@@ -56,6 +64,7 @@ else
|
||||
endif
|
||||
|
||||
nachtm.bin: nachtm.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -Os -l nachtm.lst -t gamate -o nachtm.bin nachtm.c
|
||||
../../util/gamate/gamate-fixcart nachtm.bin
|
||||
|
||||
|
||||
@@ -17,11 +17,15 @@ C1541 ?= c1541
|
||||
ifeq ($(origin SYS),command line)
|
||||
ifeq ($(SYS),c64)
|
||||
override SYS = geos-cbm
|
||||
$(info GEOS: c64 -> geos-cbm)
|
||||
ifneq ($(SILENT),s)
|
||||
$(info GEOS: c64 -> geos-cbm)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(SYS),apple2enh)
|
||||
override SYS = geos-apple
|
||||
$(info GEOS: apple2enh -> geos-apple)
|
||||
ifneq ($(SILENT),s)
|
||||
$(info GEOS: apple2enh -> geos-apple)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -55,6 +59,14 @@ else
|
||||
SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
DIRLIST = grc
|
||||
|
||||
define SUBDIR_recipe
|
||||
@@ -111,36 +123,47 @@ bitmap.c: logo.pcx
|
||||
$(SP) -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap
|
||||
|
||||
bitmap-demo.cvt: bitmap.c bitmap-demores.grc bitmap-demo.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m bitmap-demo.map bitmap-demores.grc bitmap-demo.c
|
||||
|
||||
filesel.cvt: fileselres.grc filesel.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m filesel.map fileselres.grc filesel.c
|
||||
|
||||
geosconio.cvt: geosconiores.grc geosconio.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m geosconio.map geosconiores.grc geosconio.c
|
||||
|
||||
geosver.cvt: geosverres.grc geosver.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m geosver.map geosverres.grc geosver.c
|
||||
|
||||
getid.cvt: getidres.grc getid.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m getid.map getidres.grc getid.c
|
||||
|
||||
hello1.cvt: hello1res.grc hello1.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m hello1.map hello1res.grc hello1.c
|
||||
|
||||
hello2.cvt: hello2res.grc hello2.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m hello2.map hello2res.grc hello2.c
|
||||
|
||||
overlay-demo.cvt: overlay-demores.grc overlay-demo.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m overlay-demo.map overlay-demores.grc overlay-demo.c
|
||||
|
||||
rmvprot.cvt: rmvprotres.grc rmvprot.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m rmvprot.map rmvprotres.grc rmvprot.c
|
||||
|
||||
vector-demo.cvt: vector-demores.grc vector-demo.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m vector-demo.map vector-demores.grc vector-demo.c
|
||||
|
||||
yesno.cvt: yesnores.grc yesno.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o $@ -m yesno.map yesnores.grc yesno.c
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,14 @@ else
|
||||
GRC := $(if $(wildcard ../../../bin/grc65*),../../../bin/grc65,grc65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_geos-cbm = \
|
||||
test.s \
|
||||
vlir.cvt
|
||||
@@ -56,9 +64,11 @@ samples:
|
||||
endif
|
||||
|
||||
test.s: test.grc
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(GRC) -s test.s test.grc
|
||||
|
||||
vlir.cvt: vlir.grc vlir0.s vlir1.s vlir2.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
# using separate calls here for demonstration purposes:
|
||||
$(GRC) -t $(SYS) -s vlir.s vlir.grc
|
||||
$(AS) -t $(SYS) vlir.s
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_kim1 = \
|
||||
kimHello.bin \
|
||||
kimSieve.bin \
|
||||
@@ -66,40 +74,51 @@ ramfont.o: ramfont.asm
|
||||
$(AS) ramfont.asm -o ramfont.o
|
||||
|
||||
kimLife.bin: kimLife.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t kim1 -C kim1-60k.cfg -Oi -o kimLife.bin kimLife.c
|
||||
|
||||
kimTest.bin: kimTest.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t kim1 -C kim1-60k.cfg -Oi -o kimTest.bin kimTest.c
|
||||
|
||||
kimGFX.bin: kimGFX.c subs.o ramfont.o
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t kim1 --listing kimGFX.lst -C kim1-mtuE000.cfg -o kimGFX.bin kimGFX.c subs.o ramfont.o -Ln kimgfx.lbl
|
||||
|
||||
kimSieve.bin: kimSieve.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t kim1 -C kim1-60k.cfg -O -o kimSieve.bin kimSieve.c
|
||||
|
||||
kimHello.bin: kimHello.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t kim1 -O -o kimHello.bin kimHello.c
|
||||
|
||||
# To build an intel-format file for the CORSHAM SD card reader
|
||||
|
||||
kimLife.hex: kimLife.bin
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimLife.bin -binary -offset 0x2000 -o kimLife.hex -Intel -address-length=2
|
||||
|
||||
kimTest.hex: kimTest.bin
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimTest.bin -binary -offset 0x2000 -o kimTest.hex -Intel -address-length=2
|
||||
|
||||
kimGFX.hex: kimGFX.bin ramfont.o
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimGFX.bin -binary -offset 0x2000 -o kimGFX.hex -Intel -address-length=2
|
||||
|
||||
# To build a paper tape file for uploading to the KIM-1 via terminal
|
||||
|
||||
kimLife.ptp: kimLife.bin
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimLife.bin -binary -offset 0x2000 -o kimLife.ptp -MOS_Technologies
|
||||
|
||||
kimGFX.ptp: kimGFX.bin
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimGFX.bin -binary -offset 0x2000 -o kimGFX.ptp -MOS_Technologies
|
||||
|
||||
kimTest.ptp: kimTest.bin
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
srec_cat kimTest.bin -binary -offset 0x2000 -o kimTest.ptp -MOS_Technologies
|
||||
|
||||
clean:
|
||||
|
||||
@@ -35,6 +35,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_lynx = \
|
||||
hello.lnx \
|
||||
mandelbrot.lnx \
|
||||
@@ -59,6 +67,7 @@ endif
|
||||
.SUFFIXES: .c .lnx
|
||||
|
||||
%.lnx : %.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -Oris -m $*.map -o $@ $<
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_sim6502 = \
|
||||
cpumode_example.bin \
|
||||
timer_example.bin \
|
||||
@@ -61,6 +69,7 @@ endif
|
||||
.SUFFIXES: .c .bin
|
||||
|
||||
%.bin : %.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -Oris -m $*.map -o $@ $<
|
||||
|
||||
clean:
|
||||
|
||||
@@ -39,6 +39,14 @@ else
|
||||
SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_supervision = \
|
||||
hello
|
||||
|
||||
@@ -58,6 +66,7 @@ else
|
||||
endif
|
||||
|
||||
hello: hello.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o hello -m hello.map hello.c
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_sym1 = \
|
||||
symHello.bin symTiny.bin symDisplay.bin symIO.bin symNotepad.bin symExtendedMemory.bin
|
||||
|
||||
@@ -56,21 +64,27 @@ else
|
||||
endif
|
||||
|
||||
symHello.bin: symHello.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -O -o symHello.bin symHello.c
|
||||
|
||||
symTiny.bin: symTiny.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -O -o symTiny.bin symTiny.c
|
||||
|
||||
symDisplay.bin: symDisplay.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -O -o symDisplay.bin symDisplay.c
|
||||
|
||||
symIO.bin: symIO.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -C sym1-32k.cfg -O -o symIO.bin symIO.c
|
||||
|
||||
symNotepad.bin: symNotepad.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -C sym1-32k.cfg -O -o symNotepad.bin symNotepad.c
|
||||
|
||||
symExtendedMemory.bin: symExtendedMemory.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t sym1 -C sym1-32k.cfg -O -o symExtendedMemory.bin symExtendedMemory.c
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_atari2600 = \
|
||||
notavailable
|
||||
|
||||
@@ -86,9 +94,12 @@ ifndef EXELIST_$(SYS)
|
||||
EXELIST_$(SYS) := ${patsubst %.c,%,$(wildcard *.c)}
|
||||
endif
|
||||
|
||||
all: samples
|
||||
|
||||
samples: $(EXELIST_$(SYS))
|
||||
|
||||
hello: hello.c text.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -o hello hello.c text.s
|
||||
|
||||
# empty target used to skip systems that will not work with any program in this dir
|
||||
|
||||
34
src/Makefile
34
src/Makefile
@@ -8,12 +8,6 @@ ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q=@
|
||||
else
|
||||
Q=
|
||||
endif
|
||||
|
||||
PROGS = ar65 \
|
||||
ca65 \
|
||||
cc65 \
|
||||
@@ -52,6 +46,21 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> ../wrk/common/$$@.errlog || (cat ../wrk/common/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
|
||||
@@ -70,7 +79,10 @@ ifndef BUILD_ID
|
||||
BUILD_ID := N/A
|
||||
endif
|
||||
endif
|
||||
$(info BUILD_ID: $(BUILD_ID))
|
||||
|
||||
ifneq ($(SILENT),s)
|
||||
$(info BUILD_ID: $(BUILD_ID))
|
||||
endif
|
||||
|
||||
CFLAGS += -MMD -MP -O3 -I common \
|
||||
-Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \
|
||||
@@ -161,8 +173,8 @@ $1: ../bin/$1$(EXE_SUFFIX)
|
||||
endef # PROG_template
|
||||
|
||||
../wrk/%.o: %.c
|
||||
@echo $<
|
||||
$(Q)$(CC) -c $(CFLAGS) -o $@ $<
|
||||
$(if $(QUIET),echo CC:$@)
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
../bin:
|
||||
@$(call MKDIR,$@)
|
||||
@@ -170,7 +182,8 @@ endef # PROG_template
|
||||
$(eval $(call OBJS_template,common))
|
||||
|
||||
../wrk/common/common.a: $(common_OBJS)
|
||||
$(AR) r $@ $?
|
||||
$(if $(QUIET),echo AR:$@)
|
||||
$(AR) r $@ $? $(CATERR)
|
||||
|
||||
$(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog))))
|
||||
|
||||
@@ -184,6 +197,7 @@ $(eval $(call OBJS_template,dbginfo))
|
||||
dbginfo: $(dbginfo_OBJS)
|
||||
|
||||
../wrk/dbgsh$(EXE_SUFFIX): $(dbginfo_OBJS) ../wrk/common/common.a
|
||||
$(if $(QUIET),echo LINK:$@)
|
||||
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
dbgsh: ../wrk/dbgsh$(EXE_SUFFIX)
|
||||
|
||||
@@ -47,6 +47,16 @@ else
|
||||
LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
ifneq ($(filter disk testcode.%,$(MAKECMDGOALS)),)
|
||||
ifdef CC65_HOME
|
||||
TARGET_PATH = $(CC65_HOME)/target
|
||||
@@ -120,10 +130,12 @@ DISK_atarixl = testcode.atr
|
||||
%: %.s
|
||||
|
||||
.c.o:
|
||||
$(if $(QUIET),echo $(SYS):$*.c)
|
||||
$(CC) $(CFLAGS) -Ors --codesize 500 -T -g -t $(SYS) $<
|
||||
$(AS) $(<:.c=.s)
|
||||
|
||||
.s.o:
|
||||
$(if $(QUIET),echo $(SYS):$*.s)
|
||||
$(AS) $(ASFLAGS) -t $(SYS) $<
|
||||
|
||||
.PRECIOUS: %.o
|
||||
@@ -779,7 +791,7 @@ endif
|
||||
|
||||
define SUBDIR_recipe
|
||||
|
||||
@+$(MAKE) -C $(dir) --no-print-directory $@
|
||||
@+$(MAKE) -C $(dir) $(PD) $@ $(PQ)
|
||||
|
||||
endef # SUBDIR_recipe
|
||||
|
||||
@@ -839,25 +851,34 @@ TARGETS := \
|
||||
# --------------------------------------------------------------------------
|
||||
# Rule to make the binaries for every platform
|
||||
|
||||
define TARGETDIR_recipe
|
||||
|
||||
@+$(MAKE) -C $(dir) $(PD) $(PQ)
|
||||
|
||||
endef # TARGETDIR_recipe
|
||||
|
||||
define TARGET_recipe
|
||||
|
||||
@echo making targettest for: $(T)
|
||||
@$(MAKE) -j2 SYS:=$(T)
|
||||
@$(MAKE) --no-print-directory clean SYS:=$(T)
|
||||
@$(MAKE) $(PD) clean SYS:=$(T)
|
||||
|
||||
endef # TARGET_recipe
|
||||
|
||||
platforms:
|
||||
$(foreach T,$(TARGETS),$(TARGET_recipe))
|
||||
$(foreach dir,$(DIRLIST),$(TARGETDIR_recipe))
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# some programs link against getsp.o
|
||||
|
||||
mouse-test: mouse-test.o getsp.o
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS) -t $(SYS) -o $@ $^ $(SYS).lib
|
||||
|
||||
ifneq ($(SYS),vic20)
|
||||
ft: ft.o getsp.o
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS) -t $(SYS) -o $@ $^ $(SYS).lib
|
||||
endif
|
||||
|
||||
@@ -865,6 +886,7 @@ endif
|
||||
|
||||
ifeq ($(SYS),vic20)
|
||||
ft: ft.o getsp.o
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(LD) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib
|
||||
endif
|
||||
|
||||
|
||||
@@ -36,6 +36,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_c64 = \
|
||||
c64-scpu-test.prg \
|
||||
c64dtv-test.prg \
|
||||
@@ -64,27 +72,35 @@ else
|
||||
endif
|
||||
|
||||
c64-scpu-test.prg: c64-c128-scpu-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 c64-c128-scpu-test.c -o c64-scpu-test.prg
|
||||
|
||||
c128-scpu-test.prg: c64-c128-scpu-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c128 c64-c128-scpu-test.c -o c128-scpu-test.prg
|
||||
|
||||
c64dtv-test.prg: c64dtv-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 c64dtv-test.c -o c64dtv-test.prg
|
||||
|
||||
c64-test.prg: c64-c128-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 c64-c128-test.c -o c64-test.prg
|
||||
|
||||
c128-test.prg: c64-c128-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c128 c64-c128-test.c -o c128-test.prg
|
||||
|
||||
chameleon-test.prg: chameleon-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 chameleon-test.c -o chameleon-test.prg
|
||||
|
||||
c65-test.prg: c65-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 c65-test.c -o c65-test.prg
|
||||
|
||||
turbomaster-test.prg: turbomaster-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t c64 turbomaster-test.c -o turbomaster-test.prg
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_atari = \
|
||||
charmapping.xex \
|
||||
defdev.xex \
|
||||
@@ -64,24 +72,33 @@ else
|
||||
endif
|
||||
|
||||
charmapping.xex: charmapping.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o charmapping.xex charmapping.c
|
||||
defdev.xex: defdev.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o defdev.xex defdev.c
|
||||
displaylist.xex: displaylist.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o displaylist.xex displaylist.c
|
||||
mem.xex: mem.c ../getsp.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o mem.xex mem.c ../getsp.s
|
||||
multi.xex: multi-xex.s multi-xex.cfg
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -C multi-xex.cfg multi-xex.s -o multi.xex
|
||||
ostype.xex: ostype.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o ostype.xex ostype.c
|
||||
scrcode.com: scrcode.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
# ca65 -t atari -o scrcode.o scrcode.s
|
||||
# ld65 -C atari-asm.cfg -o scrcode.com scrcode.o
|
||||
$(CL) -t atari -C atari-asm.cfg -o scrcode.com scrcode.s
|
||||
sys.xex: sys.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o sys.xex sys.c
|
||||
sound.xex: sound.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t atari -o sound.xex sound.c
|
||||
clean:
|
||||
@$(DEL) charmapping.xex 2>$(NULLDEV)
|
||||
|
||||
@@ -40,6 +40,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_c64 = \
|
||||
petscii.prg \
|
||||
cbmdir-test.prg \
|
||||
@@ -73,12 +81,14 @@ endif
|
||||
|
||||
ifeq ($(SYS),c64)
|
||||
petscii.prg: petscii.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t $(SYS) -O -o petscii.prg petscii.c
|
||||
else
|
||||
petscii.prg:
|
||||
endif
|
||||
|
||||
cbmdir-test.prg: cbmdir-test.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
ifeq ($(SYS),vic20)
|
||||
$(CL) -t $(SYS) -C vic20-32k.cfg -Oris -o $@ $<
|
||||
else
|
||||
@@ -86,6 +96,7 @@ else
|
||||
endif
|
||||
|
||||
cbmread.prg: cbmread.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
ifeq ($(SYS),vic20)
|
||||
$(CL) -t $(SYS) -C vic20-32k.cfg -Oris -o $@ $<
|
||||
else
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
EXELIST_gamate = \
|
||||
audiotest.bin lcdtest.bin ctest.bin
|
||||
|
||||
@@ -56,10 +64,13 @@ else
|
||||
endif
|
||||
|
||||
audiotest.bin: audiotest.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -l audiotest.lst -t gamate -o audiotest.bin audiotest.s
|
||||
lcdtest.bin: lcdtest.s
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -l lcdtest.lst -t gamate -o lcdtest.bin lcdtest.s
|
||||
ctest.bin: ctest.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -l ctest.lst -t gamate -o ctest.bin ctest.c
|
||||
|
||||
clean:
|
||||
|
||||
@@ -37,6 +37,14 @@ else
|
||||
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
.PHONY: all clean test
|
||||
|
||||
# Size of cartridge to generate.
|
||||
@@ -71,8 +79,11 @@ else
|
||||
endif
|
||||
|
||||
%.bin: %.c
|
||||
$(if $(QUIET),echo $(SYS):$@)
|
||||
$(CL) -t pce $< -Wl -D__CARTSIZE__=${CARTSIZE} -m $*.map -o $@
|
||||
ifndef QUIET
|
||||
@echo "use 'make conio.pce' to produce a .pce file using dd"
|
||||
endif
|
||||
|
||||
%.pce: %.bin
|
||||
dd if=$< bs=8K skip=${COUNT} > $@
|
||||
|
||||
@@ -16,6 +16,15 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
WORKDIR = ../testwrk
|
||||
|
||||
.PHONY: test continue mostlyclean clean success_message
|
||||
@@ -25,15 +34,15 @@ test:
|
||||
@$(MAKE) continue
|
||||
|
||||
continue:
|
||||
@$(MAKE) -C asm all
|
||||
@$(MAKE) -C dasm all
|
||||
@$(MAKE) -C val all
|
||||
@$(MAKE) -C ref all
|
||||
@$(MAKE) -C err all
|
||||
@$(MAKE) -C standard all
|
||||
@$(MAKE) -C standard_err all
|
||||
@$(MAKE) -C misc all
|
||||
@$(MAKE) -C todo all
|
||||
@$(MAKE) $(PD) -C asm all $(PQ)
|
||||
@$(MAKE) $(PD) -C dasm all $(PQ)
|
||||
@$(MAKE) $(PD) -C val all $(PQ)
|
||||
@$(MAKE) $(PD) -C ref all $(PQ)
|
||||
@$(MAKE) $(PD) -C err all $(PQ)
|
||||
@$(MAKE) $(PD) -C standard all $(PQ)
|
||||
@$(MAKE) $(PD) -C standard_err all $(PQ)
|
||||
@$(MAKE) $(PD) -C misc all $(PQ)
|
||||
@$(MAKE) $(PD) -C todo all $(PQ)
|
||||
@$(MAKE) success_message
|
||||
|
||||
success_message:
|
||||
@@ -42,15 +51,15 @@ success_message:
|
||||
$(info ###################################)
|
||||
|
||||
mostlyclean:
|
||||
@$(MAKE) -C asm clean
|
||||
@$(MAKE) -C dasm clean
|
||||
@$(MAKE) -C val clean
|
||||
@$(MAKE) -C ref clean
|
||||
@$(MAKE) -C err clean
|
||||
@$(MAKE) -C standard clean
|
||||
@$(MAKE) -C standard_err clean
|
||||
@$(MAKE) -C misc clean
|
||||
@$(MAKE) -C todo clean
|
||||
@$(MAKE) $(PD) -C asm clean $(PQ)
|
||||
@$(MAKE) $(PD) -C dasm clean $(PQ)
|
||||
@$(MAKE) $(PD) -C val clean $(PQ)
|
||||
@$(MAKE) $(PD) -C ref clean $(PQ)
|
||||
@$(MAKE) $(PD) -C err clean $(PQ)
|
||||
@$(MAKE) $(PD) -C standard clean $(PQ)
|
||||
@$(MAKE) $(PD) -C standard_err clean $(PQ)
|
||||
@$(MAKE) $(PD) -C misc clean $(PQ)
|
||||
@$(MAKE) $(PD) -C todo clean $(PQ)
|
||||
|
||||
clean: mostlyclean
|
||||
@$(call RMDIR,$(WORKDIR))
|
||||
|
||||
@@ -16,6 +16,15 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET := 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
WORKDIR = ../testwrk/asm
|
||||
|
||||
.PHONY: all continue mostlyclean clean
|
||||
@@ -23,20 +32,20 @@ WORKDIR = ../testwrk/asm
|
||||
all: mostlyclean continue
|
||||
|
||||
continue: mostlyclean
|
||||
@$(MAKE) -C cpudetect all
|
||||
@$(MAKE) -C opcodes all
|
||||
@$(MAKE) -C listing all
|
||||
@$(MAKE) -C val all
|
||||
@$(MAKE) -C err all
|
||||
@$(MAKE) -C misc all
|
||||
@$(MAKE) $(PD) -C cpudetect all $(PQ)
|
||||
@$(MAKE) $(PD) -C opcodes all $(PQ)
|
||||
@$(MAKE) $(PD) -C listing all $(PQ)
|
||||
@$(MAKE) $(PD) -C val all $(PQ)
|
||||
@$(MAKE) $(PD) -C err all $(PQ)
|
||||
@$(MAKE) $(PD) -C misc all $(PQ)
|
||||
|
||||
mostlyclean:
|
||||
@$(MAKE) -C cpudetect clean
|
||||
@$(MAKE) -C opcodes clean
|
||||
@$(MAKE) -C listing clean
|
||||
@$(MAKE) -C val clean
|
||||
@$(MAKE) -C err clean
|
||||
@$(MAKE) -C misc clean
|
||||
@$(MAKE) $(PD) -C cpudetect clean $(PQ)
|
||||
@$(MAKE) $(PD) -C opcodes clean $(PQ)
|
||||
@$(MAKE) $(PD) -C listing clean $(PQ)
|
||||
@$(MAKE) $(PD) -C val clean $(PQ)
|
||||
@$(MAKE) $(PD) -C err clean $(PQ)
|
||||
@$(MAKE) $(PD) -C misc clean $(PQ)
|
||||
|
||||
clean: mostlyclean
|
||||
@$(call RMDIR,$(WORKDIR))
|
||||
|
||||
@@ -20,8 +20,14 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
|
||||
@@ -52,8 +58,8 @@ define CPUDETECT_template
|
||||
|
||||
$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL)
|
||||
$(if $(QUIET),echo asm/$1-cpudetect.bin)
|
||||
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$<
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib
|
||||
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR)
|
||||
$(ISEQUAL) $1-cpudetect.ref $$@
|
||||
|
||||
endef # CPUDETECT_template
|
||||
@@ -61,7 +67,7 @@ endef # CPUDETECT_template
|
||||
$(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu))))
|
||||
|
||||
$(WORKDIR)/%.o: %.s | $(WORKDIR)
|
||||
$(CA65) -l $(@:.o=.lst) -o $@ $<
|
||||
$(CA65) -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR)
|
||||
|
||||
clean:
|
||||
@$(call RMDIR,$(WORKDIR))
|
||||
|
||||
@@ -26,7 +26,11 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
|
||||
@@ -17,6 +17,7 @@ ifdef CMD_EXE
|
||||
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
||||
TRUE = exit 0
|
||||
CAT = type $(subst /,\,$1)
|
||||
NULLDEV = nul:
|
||||
else
|
||||
S = /
|
||||
EXE =
|
||||
@@ -24,10 +25,16 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
TRUE = true
|
||||
CAT = cat $1
|
||||
NULLDEV = /dev/null
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
# .SILENT:
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
@@ -82,48 +89,52 @@ endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err-ref),)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err2) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.bin-ref),)
|
||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@
|
||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@ $(NULLERR)
|
||||
endif
|
||||
|
||||
# rem $(indfo $(CAT) $(subst /,$$S,$$$(@:.bin=.ld65-err)))
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err-ref),)
|
||||
ifndef QUIET
|
||||
@echo $(CAT) $$(@:.bin=.ld65-err)
|
||||
# FIXME: somehow this refuses to work in cmd.exe
|
||||
ifndef CMD_EXE
|
||||
$(call CAT,$$(@:.bin=.ld65-err))
|
||||
-diff -u ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||
ifndef QUIET
|
||||
@echo $(CAT) $$(@:.bin=.ld65-err2)
|
||||
# FIXME: somehow this refuses to work in cmd.exe
|
||||
ifndef CMD_EXE
|
||||
$(call CAT,$$(@:.bin=.ld65-err2))
|
||||
-diff -u ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err2),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err2) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -149,37 +160,37 @@ endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err-ref),)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err-ref),)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err2) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err2),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# check if the result bin is the same as without listing file
|
||||
ifeq ($(wildcard control/$1.err),)
|
||||
ifeq ($(wildcard control/$1.err2),)
|
||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin)
|
||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -187,7 +198,7 @@ ifneq ($(wildcard ref/$1.list-ref),)
|
||||
# we have a reference file, compare that, too
|
||||
|
||||
# remove first line which contains a version number
|
||||
$(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst)
|
||||
$(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) $(NULLERR)
|
||||
endif
|
||||
|
||||
endef # LISTING_template
|
||||
|
||||
@@ -30,6 +30,9 @@ ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 200000000
|
||||
|
||||
@@ -22,6 +22,11 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
|
||||
|
||||
@@ -51,8 +51,8 @@ define PRG_template
|
||||
|
||||
$(WORKDIR)/%.$1.prg: %.s | $(WORKDIR)
|
||||
$(if $(QUIET),echo asm/val/$$*.$1.prg)
|
||||
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
|
||||
$(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
|
||||
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR)
|
||||
$(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
|
||||
|
||||
endef # PRG_template
|
||||
|
||||
@@ -14,14 +14,21 @@ ifdef CMD_EXE
|
||||
EXE = .exe
|
||||
MKDIR = mkdir $(subst /,\,$1)
|
||||
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
||||
NULLDEV = nul:
|
||||
else
|
||||
EXE =
|
||||
MKDIR = mkdir -p $1
|
||||
RMDIR = $(RM) -r $1
|
||||
NULLDEV = /dev/null
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
||||
|
||||
@@ -26,8 +26,13 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
|
||||
|
||||
@@ -45,7 +50,7 @@ $(WORKDIR):
|
||||
|
||||
$(WORKDIR)/%.s: %.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo err/$*.s)
|
||||
$(NOT) $(CC65) -o $@ $< $(NULLERR)
|
||||
$(NOT) $(CC65) -o $@ $< $(NULLOUT) $(CATERR)
|
||||
|
||||
clean:
|
||||
@$(call RMDIR,$(WORKDIR))
|
||||
|
||||
@@ -30,6 +30,9 @@ ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 200000000
|
||||
@@ -68,7 +71,7 @@ define PRG_template
|
||||
$(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(if $(QUIET),echo misc/bug1209-ind-goto-rev.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
|
||||
@@ -76,7 +79,7 @@ $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR)
|
||||
$(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(if $(QUIET),echo misc/bug1209-ind-goto-rev-2.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
|
||||
@@ -84,7 +87,7 @@ $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDI
|
||||
$(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(if $(QUIET),echo misc/bug1209-ind-goto-rev-3.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
|
||||
@@ -92,40 +95,40 @@ $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDI
|
||||
$(WORKDIR)/pptest2.$1.$2.prg: pptest2.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(if $(QUIET),echo misc/pptest2.$1.$2.prg)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
|
||||
|
||||
# should compile, but compiler exits with internal error
|
||||
$(WORKDIR)/bug1211-ice-move-refs-2.$1.$2.prg: bug1211-ice-move-refs-2.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(if $(QUIET),echo misc/bug1211-ice-move-refs-2.$1.$2.prg)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
|
||||
|
||||
# this one requires --std=c89, it fails with --std=c99
|
||||
$(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug1265.$1.$2.prg)
|
||||
$(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
|
||||
|
||||
# should not compile, but gives different diagnostics in C99 mode than in others
|
||||
$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c | $(WORKDIR)
|
||||
$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c $(ISEQUAL) | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug2515.$1.$2.prg)
|
||||
$(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||
$(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.c99.ref
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.ref
|
||||
|
||||
# should not issue any warnings in C99 mode
|
||||
$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c | $(WORKDIR)
|
||||
$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c $(ISEQUAL) | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug2637.$1.$2.prg)
|
||||
$(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2637.$1.$2.out
|
||||
$(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2637.$1.$2.out
|
||||
$(ISEQUAL) $(WORKDIR)/bug2637.$1.$2.out bug2637.ref
|
||||
|
||||
# this one requires -Werror
|
||||
$(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug1768.$1.$2.prg)
|
||||
$(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
|
||||
@@ -133,7 +136,7 @@ $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
|
||||
# should compile, but then hangs in an endless loop
|
||||
$(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/endless.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
$(NOT) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
|
||||
@@ -142,12 +145,12 @@ $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
|
||||
# in a useful way
|
||||
$(WORKDIR)/bug2655.$1.$2.prg: bug2655.c $(ISEQUAL) | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug2655.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/bug2655.$1.$2.out
|
||||
$(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/bug2655.$1.$2.out
|
||||
$(ISEQUAL) $(WORKDIR)/bug2655.$1.$2.out bug2655.ref
|
||||
|
||||
$(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/limits.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/limits.$1.$2.out
|
||||
@@ -155,24 +158,24 @@ $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR)
|
||||
|
||||
$(WORKDIR)/goto.$1.$2.prg: goto.c $(ISEQUAL) | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/goto.$1.$2.prg)
|
||||
$(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/goto.$1.$2.out
|
||||
$(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/goto.$1.$2.out
|
||||
$(ISEQUAL) $(WORKDIR)/goto.$1.$2.out goto.ref
|
||||
|
||||
# this one requires failure with --std=c89, it fails with --std=cc65 due to
|
||||
# stricter checks
|
||||
$(WORKDIR)/bug2304-implicit-func.$1.$2.prg: bug2304-implicit-func.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug2304-implicit-func.$1.$2.prg)
|
||||
$(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
|
||||
|
||||
# should not compile until 3-byte struct by value tests are re-enabled
|
||||
$(WORKDIR)/struct-by-value.$1.$2.prg: struct-by-value.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/struct-by-value.$1.$2.prg)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
|
||||
|
||||
# the rest are tests that fail currently for one reason or another
|
||||
$(WORKDIR)/sitest.$1.$2.prg: sitest.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
|
||||
# $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
|
||||
|
||||
endef # PRG_template
|
||||
|
||||
@@ -29,7 +29,11 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 200000000
|
||||
|
||||
@@ -26,6 +26,9 @@ ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 4000000000 -c
|
||||
|
||||
@@ -26,8 +26,13 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
|
||||
|
||||
@@ -49,7 +54,7 @@ define PRG_template
|
||||
|
||||
$(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo standard_err/$$*.$1.$2.prg)
|
||||
$(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
|
||||
endef # PRG_template
|
||||
|
||||
|
||||
@@ -28,7 +28,11 @@ ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
SIM65FLAGS = -x 200000000
|
||||
|
||||
|
||||
@@ -21,13 +21,16 @@ else
|
||||
NULLDEV = /dev/null
|
||||
MKDIR = mkdir -p $1
|
||||
RMDIR = $(RM) -r $1
|
||||
CATRES = || (cat $(WORKDIR)/$$@.out && false)
|
||||
CATRES = > $(WORKDIR)/$$@.out 2> $(WORKDIR)/$$@.out || (cat $(WORKDIR)/$$@.out && false)
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
ifndef CMD_EXE
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 4000000000 -c
|
||||
@@ -56,10 +59,10 @@ define PRG_template
|
||||
|
||||
$(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo val/$$*.$1.$2.prg)
|
||||
$(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out $(CATRES)
|
||||
$(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
|
||||
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLOUT) $(CATERR)
|
||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLOUT) $(CATERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(CATRES)
|
||||
|
||||
endef # PRG_template
|
||||
|
||||
|
||||
@@ -4,6 +4,15 @@ ifneq ($(SILENT),s)
|
||||
$(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
PQ = "QUIET=1"
|
||||
PD = --no-print-directory
|
||||
endif
|
||||
|
||||
.PHONY: atari gamate zlib
|
||||
|
||||
@@ -12,16 +21,16 @@ util: atari gamate zlib
|
||||
all: util
|
||||
|
||||
atari:
|
||||
@$(MAKE) -C atari --no-print-directory $@
|
||||
@$(MAKE) -C atari $(PD) $(PQ)
|
||||
gamate:
|
||||
@$(MAKE) -C gamate --no-print-directory $@
|
||||
@$(MAKE) -C gamate $(PD) $(PQ)
|
||||
zlib:
|
||||
@$(MAKE) -C zlib --no-print-directory $@
|
||||
@$(MAKE) -C zlib $(PD) $(PQ)
|
||||
|
||||
mostlyclean clean:
|
||||
@$(MAKE) -C atari --no-print-directory $@
|
||||
@$(MAKE) -C gamate --no-print-directory $@
|
||||
@$(MAKE) -C zlib --no-print-directory $@
|
||||
@$(MAKE) -C atari $(PD) $@ $(PQ)
|
||||
@$(MAKE) -C gamate $(PD) $@ $(PQ)
|
||||
@$(MAKE) -C zlib $(PD) $@ $(PQ)
|
||||
|
||||
install zip:
|
||||
|
||||
|
||||
@@ -4,6 +4,13 @@ ifneq ($(SILENT),s)
|
||||
$(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
||||
@@ -28,6 +35,7 @@ CFLAGS += -O3 -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS)
|
||||
atari: ataricvt
|
||||
|
||||
ataricvt: ataricvt.c
|
||||
$(if $(QUIET),echo HOST:$@)
|
||||
$(CC) $(CFLAGS) -o ataricvt ataricvt.c
|
||||
|
||||
mostlyclean clean:
|
||||
|
||||
@@ -4,6 +4,13 @@ ifneq ($(SILENT),s)
|
||||
$(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
||||
@@ -28,6 +35,7 @@ CFLAGS += -O3 -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS)
|
||||
gamate: gamate-fixcart
|
||||
|
||||
gamate-fixcart: gamate-fixcart.c
|
||||
$(if $(QUIET),echo HOST:$@)
|
||||
$(CC) $(CFLAGS) -o gamate-fixcart gamate-fixcart.c
|
||||
|
||||
mostlyclean clean:
|
||||
|
||||
@@ -4,6 +4,13 @@ ifneq ($(SILENT),s)
|
||||
$(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
ifeq ($(SILENT),s)
|
||||
QUIET = 1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
||||
@@ -35,6 +42,7 @@ warning:
|
||||
@echo "note that you need zlib installed first"
|
||||
|
||||
deflater: deflater.c
|
||||
$(if $(QUIET),echo HOST:$@)
|
||||
$(CC) $(CFLAGS) -o deflater deflater.c -lz
|
||||
|
||||
mostlyclean clean:
|
||||
|
||||
Reference in New Issue
Block a user