blob: 3d73033496a4cbfa0f6c41303ccbdda546339d99 [file] [log] [blame]
adamdunkels7e4982c2003-03-19 16:26:18 +00001# Copyright (c) 2002, Adam Dunkels.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
adamdunkelscc1ea182004-08-09 20:54:54 +000012# 3. The name of the author may not be used to endorse or promote
adamdunkels7e4982c2003-03-19 16:26:18 +000013# products derived from this software without specific prior
14# written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
17# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# This file is part of the Contiki desktop environment
29#
oliverschmidt505de312005-04-24 23:09:31 +000030# $Id: Makefile,v 1.12 2005/04/24 23:09:31 oliverschmidt Exp $
adamdunkels7e4982c2003-03-19 16:26:18 +000031#
32
33CONTIKI=../contiki
adamdunkelsa4040a12003-04-24 17:02:10 +000034CONTIKICC65=../contiki-cc65
adamdunkels7e4982c2003-03-19 16:26:18 +000035
36usage:
37 @echo "Make sure the Contiki sources is in the directory $(CONTIKI)"
38 @echo 'To compile Contiki, use "'$(MAKE)' target" where target'
39 @echo 'is one of the following:'
adamdunkelsb059c212003-07-30 22:48:49 +000040 @echo all
41 @echo c64
42 @echo programs
adamdunkels82285832003-04-08 18:21:57 +000043 @echo d64
44 @echo programs
adamdunkels7e4982c2003-03-19 16:26:18 +000045 @echo '(Also check the Makefile for more targets to try...)'
46
adamdunkelsb059c212003-07-30 22:48:49 +000047all: clean c64 programs
48
adamdunkels82285832003-04-08 18:21:57 +000049programs:
adamdunkelsa4040a12003-04-24 17:02:10 +000050 $(MAKE) CONTIKI=$(CONTIKI) CONTIKICC65=$(CONTIKICC65) -f Makefile.programs
adamdunkelsb059c212003-07-30 22:48:49 +000051c64:
52 $(MAKE) CONTIKI=$(CONTIKI) CONTIKICC65=$(CONTIKICC65) -f Makefile.c64
adamdunkelsa4040a12003-04-24 17:02:10 +000053
adamdunkelsb3cb9c22004-09-12 13:22:52 +000054c64-exo:
55 $(MAKE) CONTIKI=$(CONTIKI) CONTIKICC65=$(CONTIKICC65) -f Makefile.c64 contiki-exo
56
adamdunkelsb3a14c82003-09-04 22:00:18 +000057wget:
58 $(MAKE) CONTIKI=$(CONTIKI) CONTIKICC65=$(CONTIKICC65) -f Makefile.c64-wget
59
60
61CCDEPFLAGS=-D__CBM__ -D__C64__ -DCTK_HIRES -DWITH_UIP -DWITH_LOADER_ARCH -I/usr/local/lib/cc65/include
adamdunkelsa4040a12003-04-24 17:02:10 +000062
oliverschmidtaaaef942005-04-18 21:49:58 +000063include $(CONTIKICC65)/Makefile.cc65
adamdunkelsa4040a12003-04-24 17:02:10 +000064
oliverschmidt505de312005-04-24 23:09:31 +000065d64:
66 c1541 -format contiki,00 d64 contiki.d64
67 c1541 -attach contiki.d64 -write contiki
68 c1541 -attach contiki.d64 -write config.cfg
69 c1541 -attach contiki.d64 $(foreach dsc, $(wildcard *.dsc), -write $(dsc))
70 c1541 -attach contiki.d64 $(foreach prg, $(wildcard *.prg), -write $(prg))
71 c1541 -attach contiki.d64 $(foreach sav, $(wildcard *.sav), -write $(sav))
72 c1541 -attach contiki.d64 $(foreach drv, $(wildcard *.drv), -write $(drv))
73 c1541 -attach contiki.d64 $(foreach ser, $(wildcard *.ser), -write $(ser))
74 c1541 -attach contiki.d64 -list