# The port name must be the same as the one used in the SDCC '-mxxx' argument.
# Each port must have a spec.mk which describes how to build the object
# files and how to run the emulator.
-ALL_PORTS = $(filter-out CVS mcs51 gbz80,$(notdir $(wildcard $(PORTS_DIR)/*)))
+ALL_PORTS = $(filter-out CVS mcs51 ds390 gbz80,$(notdir $(wildcard $(PORTS_DIR)/*)))
+
+# These ports will be cleaned with 'make clean'
+CLEAN_PORTS = $(filter-out CVS,$(notdir $(wildcard $(PORTS_DIR)/*)))
all: test-ports
test-mcs51:
$(MAKE) inter-port-clean test-port PORT=mcs51
-# Helper rule for testing the host cc only
+ # Helper rule for testing the ds390 port only
+test-ds390:
+ $(MAKE) inter-port-clean test-port PORT=ds390
+
+### Helper rule for testing the host cc only
test-host:
- $(MAKE) inter-port-clean clean test-port PORT=host
+ $(MAKE) inter-port-clean test-port PORT=host
test-host2:
$(MAKE) test-port PORT=host
SDCC_DIR = ../..
SDCC_EXTRA_DIR = ../../../sdcc-extra
+
# Defaults. Override in spec.mk if required.
# Path to SDCC
SDCC = $(SDCC_DIR)/bin/sdcc
# Extension of files that can be run in the emulator
EXEEXT = .bin
# Currently unused. Extension to append to intermediate directories.
-DIREXT =
+DIREXT =
# Only include if we're in a per-port call.
ifdef PORT
# BeginGeneric rules
-clean:
- rm -rf $(CASES_DIR) $(RESULTS_DIR) *.pyc
+clean: inter-port-clean
+ rm -rf $(CASES_DIR) $(RESULTS_DIR) *.pyc fwk/lib/timeout fwk/lib/timeout.exe
+ for i in $(CLEAN_PORTS); do $(MAKE) -f $(PORTS_DIR)/$$i/spec.mk _clean PORT=$$i; done
inter-port-clean:
- rm -f fwk/lib/*.o fwk/lib/*.asm fwk/lib/*.rst fwk/lib/*.lst fwk/lib/*.rel
+ rm -f fwk/lib/*.o fwk/lib/*.asm fwk/lib/*.rst fwk/lib/*.lst fwk/lib/*.rel \
+ fwk/lib/*.ihx fwk/lib/*.map fwk/lib/*.sym