blob: cd6d4ee4b714a205ddfcb45b4c1ee6f05de148bb [file] [log] [blame]
adamdunkels1103ef92003-04-02 09:17: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.
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#
adamdunkelsd4805502003-08-20 22:37:45 +000033# $Id: Makefile,v 1.7 2003/08/20 22:37:45 adamdunkels Exp $
adamdunkels1103ef92003-04-02 09:17:18 +000034#
35
36CONTIKI=../contiki
37CC=gcc
adamdunkelsd4805502003-08-20 22:37:45 +000038CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes \
39 -g -pg -fpack-struct \
adamdunkels1103ef92003-04-02 09:17:18 +000040 -Iapps -Ictk -Iuip -Iconf \
41 -I$(CONTIKI)/apps -I$(CONTIKI)/ctk -I$(CONTIKI)/ek \
42 -I$(CONTIKI)/lib -I$(CONTIKI)/uip \
43 `gtk12-config --cflags`\
44 -DWITH_ETHERNET -DWITH_TAPDEV -DWITH_ASCII \
adamdunkelsd4805502003-08-20 22:37:45 +000045 -DWITH_WWW -DWITH_EMAIL -DWITH_UIP \
46 -DWITH_CTKVNC
adamdunkels1103ef92003-04-02 09:17:18 +000047LDFLAGS=-pg `gtk12-config --libs`
48
49%.o: %.c
50 $(CC) $(CFLAGS) -c $(<:.o=.c)
51%.o: apps/%.c
52 $(CC) $(CFLAGS) -c $(<:.o=.c)
53%.o: ctk/%.c
54 $(CC) $(CFLAGS) -c $(<:.o=.c)
55%.o: uip/%.c
56 $(CC) $(CFLAGS) -c $(<:.o=.c)
57%.o: $(CONTIKI)/apps/%.c
58 $(CC) $(CFLAGS) -c $(<:.o=.c)
59%.o: $(CONTIKI)/ctk/%.c
60 $(CC) $(CFLAGS) -c $(<:.o=.c)
61%.o: $(CONTIKI)/ek/%.c
62 $(CC) $(CFLAGS) -c $(<:.o=.c)
63%.o: $(CONTIKI)/lib/%.c
64 $(CC) $(CFLAGS) -c $(<:.o=.c)
65%.o: $(CONTIKI)/uip/%.c
66 $(CC) $(CFLAGS) -c $(<:.o=.c)
67
68
adamdunkels12ebc1a2003-08-11 22:19:19 +000069WWW=www.o webclient.o http-strings.o htmlparser.o html-strings.o www-dsc.o http-user-agent-string.o
70EMAIL=email.o smtp.o smtp-strings.o ctk-textedit.o
adamdunkelsc8fc2302003-05-28 05:22:39 +000071WEBSERVER=webserver.o webserver-dsc.o httpd.o httpd-cgi.o httpd-fs.o
adamdunkels1103ef92003-04-02 09:17:18 +000072TELNET=simpletelnet.o telnet.o
adamdunkelsd4805502003-08-20 22:37:45 +000073
74CTKGTK=ctk-gtksim.o ctk-conio.o libconio.o
75CTKVNC=ctk-vncserver.o libconio.o vnc-server.o vnc-out.o ctk-vncfont.o
adamdunkels1103ef92003-04-02 09:17:18 +000076
77contiki: contiki-main.o \
adamdunkels34bda132003-04-08 18:20:17 +000078 program-handler.o about.o netconf.o processes.o \
adamdunkelsc8fc2302003-05-28 05:22:39 +000079 about-dsc.o netconf-dsc.o processes-dsc.o \
adamdunkelsd4805502003-08-20 22:37:45 +000080 $(CTKVNC) \
81 ctk.o dispatcher.o \
adamdunkelsc8fc2302003-05-28 05:22:39 +000082 uip.o uip_arch.o uip_arp.o uip-signal.o resolv.o \
83 uip_main.o tapdev.o tapdev-drv.o \
adamdunkels12ebc1a2003-08-11 22:19:19 +000084 $(EMAIL) email-dsc.o $(WEBSERVER) $(TELNET) telnet-dsc.o \
85 vnc.o vnc-viewer.o vnc-draw.o \
86 calc.o calc-dsc.o \
87 $(WWW) \
adamdunkelsd4805502003-08-20 22:37:45 +000088# maze.o maze-dsc.o
adamdunkels1103ef92003-04-02 09:17:18 +000089 gcc $(LDFLAGS) -o $@ $^
90
91clean:
92 rm -f *.o *~ *core contiki *.s
93
94depend:
95 gcc -MM -Iapps -Ictk -Iuip -Iconf \
96 -I$(CONTIKI)/lib -I$(CONTIKI)/ek \
97 -I$(CONTIKI)/ctk -I$(CONTIKI)/apps -I$(CONTIKI)/uip \
98 *.c */*.c $(CONTIKI)/*/*.c > Makefile.depend
99
adamdunkelsc8fc2302003-05-28 05:22:39 +0000100include Makefile.depend