From c26085ec8c6314342fbd0091c2d2e4e39bbc8bbd Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 17 Jun 2016 16:42:50 +0200 Subject: [PATCH 1/2] Some 6502 target changes - platform/atarixl/Makefile.atarixl: put two more objects into high memory - platform/atarixl/contiki-conf.h: define WWW_CONF_WGET_EXEC - tools/6502/Makefile: add 'clean' target; remove unused CONTIKI define --- platform/atarixl/Makefile.atarixl | 2 +- platform/atarixl/contiki-conf.h | 1 + tools/6502/Makefile | 41 ++++++++++++++++++++----------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/platform/atarixl/Makefile.atarixl b/platform/atarixl/Makefile.atarixl index 64ade5a13..b45482db9 100644 --- a/platform/atarixl/Makefile.atarixl +++ b/platform/atarixl/Makefile.atarixl @@ -35,7 +35,7 @@ CONTIKI_CPU = $(CONTIKI)/cpu/6502 include $(CONTIKI_CPU)/Makefile.6502 SHADOW_RAM_SOURCEFILES = ethernet.c ethernet-drv.c timer.c uip.c uiplib.c -SHADOW_RAM2_SOURCEFILES = clock.c uip_arch.c uip_arp.c +SHADOW_RAM2_SOURCEFILES = clock.c uip_arch.c uip_arp.c unload.c random.c # Set target-specific variable values ${addprefix $(OBJECTDIR)/,${call oname, $(SHADOW_RAM_SOURCEFILES)}}: CFLAGS += --code-name SHADOW_RAM diff --git a/platform/atarixl/contiki-conf.h b/platform/atarixl/contiki-conf.h index 9adcdd93f..1ebdcc9c5 100644 --- a/platform/atarixl/contiki-conf.h +++ b/platform/atarixl/contiki-conf.h @@ -60,5 +60,6 @@ #define WWW_CONF_WEBPAGE_WIDTH 40 #define WWW_CONF_WEBPAGE_HEIGHT 19 #define WWW_CONF_HISTORY_SIZE 4 +#define WWW_CONF_WGET_EXEC(url) exec("wget.com", url) #endif /* CONTIKI_CONF_H_ */ diff --git a/tools/6502/Makefile b/tools/6502/Makefile index d88a4790f..46b0d4095 100644 --- a/tools/6502/Makefile +++ b/tools/6502/Makefile @@ -31,10 +31,6 @@ # Author: Oliver Schmidt # -ifndef CONTIKI - ${error CONTIKI not defined! You must specify where Contiki resides} -endif - ifndef AC ${error AC not defined! You must specify where the AppleCommander jar resides} endif @@ -48,6 +44,7 @@ ifndef DIR2ATR endif all: apple2 atari c64 c128 +clean: apple2-clean atari-clean c64-clean c128-clean ifeq ($(shell echo),) NULLDEV = /dev/null @@ -65,19 +62,20 @@ endif CC65 := $(shell cl65 --print-target-path) define makes -$1-makes: - $(MAKE) -C ../../cpu/6502/ethconfig TARGET=$1 - $(MAKE) -C ../../cpu/6502/ipconfig TARGET=$1 - $(MAKE) -C ../../examples/webbrowser TARGET=$1 - $(MAKE) -C ../../examples/webbrowser-80col TARGET=$1 - $(MAKE) -C ../../examples/wget TARGET=$1 - $(MAKE) -C ../../examples/irc TARGET=$1 - $(MAKE) -C ../../examples/irc-80col TARGET=$1 - $(MAKE) -C ../../examples/webserver TARGET=$1 HTTPD-CFS=1 - $(MAKE) -C ../../examples/telnet-server TARGET=$1 +$1-$2makes: + $(MAKE) -C ../../cpu/6502/ethconfig TARGET=$1 $2 + $(MAKE) -C ../../cpu/6502/ipconfig TARGET=$1 $2 + $(MAKE) -C ../../examples/webbrowser TARGET=$1 $2 + $(MAKE) -C ../../examples/webbrowser-80col TARGET=$1 $2 + $(MAKE) -C ../../examples/wget TARGET=$1 $2 + $(MAKE) -C ../../examples/irc TARGET=$1 $2 + $(MAKE) -C ../../examples/irc-80col TARGET=$1 $2 + $(MAKE) -C ../../examples/webserver TARGET=$1 HTTPD-CFS=1 $2 + $(MAKE) -C ../../examples/telnet-server TARGET=$1 $2 endef $(eval $(call makes,apple2enh)) +$(eval $(call makes,apple2enh,clean)) %.zip: zip $@ $^ @@ -85,6 +83,9 @@ $(eval $(call makes,apple2enh)) apple2: contiki-apple2.zip +apple2-clean: apple2enh-cleanmakes + rm -f contiki-apple2.zip contiki-apple2-1.dsk contiki-apple2-2.dsk contiki-apple2-3.dsk contiki-apple2.po + contiki-apple2.zip: contiki-apple2-1.dsk contiki-apple2-2.dsk contiki-apple2-3.dsk contiki-apple2.po contiki-apple2-1.dsk: apple2enh-makes @@ -168,9 +169,13 @@ contiki-apple2.po: apple2enh-makes java -jar $(AC) -p $@ notfound.htm bin 0 < ../../examples/webserver/httpd-cfs/notfound.htm $(eval $(call makes,atarixl)) +$(eval $(call makes,atarixl,clean)) atari: contiki-atari.zip +atari-clean: atarixl-cleanmakes + rm -f contiki-atari.zip contiki-atari-1.atr contiki-atari-2.atr contiki-atari-3.atr contiki-atari.atr + contiki-atari.zip: contiki-atari-1.atr contiki-atari-2.atr contiki-atari-3.atr contiki-atari.atr contiki-atari-1.atr: atarixl-makes @@ -252,9 +257,13 @@ contiki-atari.atr: atarixl-makes rm -r atr $(eval $(call makes,c64)) +$(eval $(call makes,c64,clean)) c64: contiki-c64.zip +c64-clean: c64-cleanmakes + rm -f contiki-c64.zip contiki-c64-1.d64 contiki-c64-2.d64 contiki-c64-3.d64 contiki-c64.d71 contiki-c64.d81 + contiki-c64.zip: contiki-c64-1.d64 contiki-c64-2.d64 contiki-c64-3.d64 contiki-c64.d71 contiki-c64.d81 contiki-c64-1.d64: c64-makes @@ -351,9 +360,13 @@ contiki-c64.d81: c64-makes $(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s >$(NULLDEV) $(eval $(call makes,c128)) +$(eval $(call makes,c128,clean)) c128: contiki-c128.zip +c128-clean: c128-cleanmakes + rm -f contiki-c128.zip contiki-c128-1.d64 contiki-c128-2.d64 contiki-c128.d71 contiki-c128.d81 + contiki-c128.zip: contiki-c128-1.d64 contiki-c128-2.d64 contiki-c128.d71 contiki-c128.d81 contiki-c128-1.d64: c128-makes From 4373aecec295cf0f5c1098e7c28c5a3023f8a42d Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 5 Jul 2016 00:47:52 +0200 Subject: [PATCH 2/2] Tag non-file goals as ".PHONY" --- tools/6502/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/6502/Makefile b/tools/6502/Makefile index 46b0d4095..76837fe1d 100644 --- a/tools/6502/Makefile +++ b/tools/6502/Makefile @@ -62,6 +62,7 @@ endif CC65 := $(shell cl65 --print-target-path) define makes +.PHONY: $1-$2makes $1-$2makes: $(MAKE) -C ../../cpu/6502/ethconfig TARGET=$1 $2 $(MAKE) -C ../../cpu/6502/ipconfig TARGET=$1 $2 @@ -81,6 +82,8 @@ $(eval $(call makes,apple2enh,clean)) zip $@ $^ echo $(ZIPCOMMENT) | zip -z $@ +.PHONY: apple2 apple2-clean atari atari-clean c64 c64-clean c128 c128-clean + apple2: contiki-apple2.zip apple2-clean: apple2enh-cleanmakes