blob: 8e98e910cb3a744be6cb01574d7b0bb255d46a4a [file] [log] [blame]
kthacker62e146c2006-04-17 15:11:35 +00001# Copyright (c) 2003, 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.
12# 3. All advertising materials mentioning features or use of this software
13# must display the following acknowledgement:
14# This product includes software developed by Adam Dunkels.
15# 4. The name of the author may not be used to endorse or promote
16# products derived from this software without specific prior
17# written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31# This file is part of the Contiki desktop environment
32#
33# $Id: Makefile.programs,v 1.1 2006/04/17 15:11:36 kthacker Exp $
34#
35# convert to cpc
36
37UIP_PRGS = ../contiki/apps/www.prg ../contiki/apps/www.dsc \
38 ../contiki/apps/websrv.prg ../contiki/apps/websrv.dsc \
39 ../contiki/apps/stelnet.prg ../contiki/apps/stelnet.dsc \
40 ../contiki/apps/ftp.prg ../contiki/apps/ftp.dsc \
41 ../contiki/apps/email.prg ../contiki/apps/email.dsc \
42 ../contiki/apps/dhcp.prg ../contiki/apps/dhcp.dsc \
43 ../contiki/apps/wget.dsc \
44 ../contiki/apps/vnc.prg ../contiki/apps/vnc.dsc \
45# ../contiki/apps/irc.prg ../contiki/apps/irc.dsc
46# ../contiki/apps/wget.prg
47# ../contiki/apps/telnetd.prg ../contiki/apps/telnetd.dsc \
48
49
50
51all: ./arch/crt0-dsc.o \
52 ./arch/crt0-prg.o \
53 ./arch/contiki_labels.o \
54 ./loader/loader-arch-module.o \
55 ./apps/welcome.prg \
56 ../contiki/apps/conio.prg \
57 ../contiki/apps/about.prg ../contiki/apps/about.dsc \
58 ../contiki/apps/netconf.prg ../contiki/apps/netconf.dsc \
59 ../contiki/apps/process.prg ../contiki/apps/process.dsc \
60 ../contiki/apps/calc.prg ../contiki/apps/calc.dsc \
61 ../contiki/apps/editor.prg ../contiki/apps/editor.dsc \
62 ../contiki/apps/dir.prg ./apps/dir.dsc \
63 ./apps/config.prg \
64 ./apps/confedit.prg \
65 ./apps/confedit.dsc \
66 ../contiki/apps/shell.prg ../contiki/apps/shell.dsc
67# $(UIP_PRGS) \
68
69# ./cfs-cpc.drv \
70# ./ctk-text.drv \
71# ./ctk-default.drv \
72# ./ctk-80col.drv \
73# ./slip.drv slip.dsc \
74# ./cgterm.prg cgterm.dsc \
75
76# ./apps/memstat.prg ./apps/memstat.dsc \
77
78SYS=cpc
79
80include Makefile.common
81
82CFLAGS:=$(CFLAGSCOMMON) --compile-only \
83 -DWITH_ASCII \
84 -DWITH_CONIO \
85 -DWITH_LOADER_ARCH
86
87
88# conversion of intel hex record to binary, cpc binary with header, then inject into disc image
89define MAKE_DSC
90 bin/makelnk -r -o $@.ihx arch/crt0-prg.o $< > $@.lnk
91 $(LD) -f $@.lnk
92 bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
93 bin/addhead $@.bin $@.bin.ams
94 bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
95endef
96
97%.dsc: %-dsc.o
98 $(MAKE_DSC)
99
100define MAKE_PRG
101 bin/makelnk -r -m -o $@.ihx -k /usr/local/share/sdcc/lib/z80 -l z80 arch/crt0-prg.o loader/loader-arch-module.o arch/contiki_labels.o $^ > $@.lnk
102 $(LD) -f $@.lnk
103 bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
104 bin/addhead $@.bin $@.bin.ams
105 bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
106endef
107
108../contiki/apps/irc.prg: ../contiki/apps/ircc.o ../contiki/apps/ircc-strings.o \
109 ../contiki/apps/irc.o ../contiki/uip/socket.o ../contiki/uip/uipbuf.o
110 $(MAKE_PRG)
111
112../contiki/apps/irc.dsc: ../contiki/apps/irc-dsc.o
113 $(MAKE_DSC)
114
115./apps/config.prg: apps/config.o
116 $(MAKE_PRG)
117
118./apps/confedit.prg: apps/configedit.o
119 $(MAKE_PRG)
120
121./apps/confedit.dsc: apps/configedit-dsc.o
122 $(MAKE_DSC)
123
124./apps/welcome.prg: apps/welcome.o
125 $(MAKE_PRG)
126
127../contiki/apps/about.prg: ../contiki/apps/about.o
128 $(MAKE_PRG)
129
130../contiki/apps/calc.prg: ../contiki/apps/calc.o
131 $(MAKE_PRG)
132
133./apps/cgterm.prg: ./apps/cgterm.o \
134 ../contiki/uip/socket.o \
135 ../contiki/uip/uipbuf.o \
136 lib/lc-asm.o
137 $(MAKE_PRG)
138
139./apps/cgterm.dsc: ./apps/cgterm-dsc.o
140 $(MAKE_DSC)
141
142../contiki/apps/dhcp.prg: ../contiki/apps/dhcp.o ../contiki/uip/dhcpc.o ./lib/lc-asm.o
143 $(MAKE_PRG)
144
145../contiki/apps/editor.prg: ../contiki/apps/editor.o \
146 ../contiki/lib/ctk-filedialog.o \
147 ../contiki/lib/memb.o
148 $(MAKE_PRG)
149
150../contiki/apps/email.prg: ../contiki/apps/email.o \
151 ../contiki/lib/ctk-textedit.o \
152 ../contiki/apps/smtp-socket.o \
153 ../contiki/apps/smtp-strings.o \
154 ../contiki/uip/socket.o \
155 ../contiki/uip/uipbuf.o \
156 ./lib/lc-asm.o
157 $(MAKE_PRG)
158
159../contiki/apps/ftp.prg: ../contiki/apps/ftp.o \
160 ../contiki/apps/ftpc.o \
161 ../contiki/lib/memb.o
162 $(MAKE_PRG)
163
164../contiki/apps/netconf.prg: ../contiki/apps/netconf.o
165 $(MAKE_PRG)
166
167../contiki/apps/process.prg: ../contiki/apps/processes.o
168 $(MAKE_PRG)
169
170../contiki/apps/process.dsc: ../contiki/apps/processes-dsc.o
171 $(MAKE_DSC)
172
173../contiki/apps/dir.prg: ../contiki/apps/directory.o
174 $(MAKE_PRG)
175
176./apps/dir.dsc: ./apps/directory-dsc.o
177 $(MAKE_DSC)
178
179../contiki/apps/shell.prg: ../contiki/apps/shell-gui.o ./apps/shell.o
180 $(MAKE_PRG)
181
182../contiki/apps/telnetd.prg: ../contiki/apps/telnetd.o \
183 ../contiki/apps/shell.o \
184 ../contiki/lib/memb.o \
185 ../contiki/apps/telnetd-gui.o
186 $(MAKE_PRG)
187
188../contiki/apps/telnetd.dsc: telnetd-dsc.o
189 $(MAKE_DSC)
190
191../contiki/apps/www.prg: $(WWW)
192 $(MAKE_PRG)
193
194../contiki/apps/websrv.prg: $(WEBSERVER)
195 $(MAKE_PRG)
196
197../contiki/apps/websrv.dsc: ../contiki/apps/webserver-dsc.o
198 $(MAKE_DSC)
199
200../contiki/apps/stelnet.prg: $(TELNET)
201 $(MAKE_PRG)
202
203../contiki/apps/stelnet.dsc: ../contiki/apps/telnet-dsc.o
204 $(MAKE_DSC)
205
206../contiki/apps/wget.prg: $(WGET)
207 $(MAKE_PRG)
208
209../contiki/apps/wget.dsc: apps/wget-dsc.o
210 $(MAKE_DSC)
211
212../contiki/apps/splip.drv: slip-drv.o rs232dev.o
213
214
215VNC=../contiki/apps/vnc.o \
216 ../contiki/apps/vnc-viewer.o \
217 ./apps/vnc-draw.o
218
219../contiki/apps/conio.prg: \
220 ../contiki/ctk/ctk-conio-service.o \
221 ./arch/conio.o
222 $(MAKE_PRG)
223
224#ctk-text.drv: ctk-conio-service.o
225
226ctk-80col.drv: ctk-80col.o
227
228ctk-default.drv: ctk-hires-service.o
229
230default.prg: themeloader.o ctk-hires-theme-default.o
231
232
233
234../contiki/apps/vnc.prg: $(VNC)
235 $(MAKE_PRG)
236
237#blueround.prg: themeloader.o ctk-hires-theme-blueround.o contiki-labels.o
238# cl65 --module -t c64 -o $@ loader-arch-module.o $^
239
240#default.prg: themeloader.o ctk-hires-theme-default.o contiki-labels.o
241# cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
242
243#enabler.prg: themeloader.o ctk-hires-theme-enabler.o contiki-labels.o
244# cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
245
246#springlight.prg: themeloader.o ctk-hires-theme-springlight.o contiki-labels.o
247# cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
248
249#ravenpine.prg: themeloader.o ctk-hires-theme-ravenpine.o contiki-labels.o
250# cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
251
252
253
254
255./apps/memstat.prg: apps/memstat.o
256 $(MAKE_PRG)
257
258./apps/memstat.dsc: apps/memstat-dsc.o
259 $(MAKE_DSC)
260
261mtest.prg: mtest.o mtp.o mt.o mtarch.o mtarch-asm.o
262
263lc-test: lc-test.o lc-asm.o