source: network-demos/http/Makefile @ d7de1ab

4.11network-demos-4-10-branch
Last change on this file since d7de1ab was d7de1ab, checked in by Joel Sherrill <joel.sherrill@…>, on 02/10/09 at 18:23:42

2009-02-10 Joel Sherrill <joel.sherrill@…>

  • Makefile: Fix typo.
  • Property mode set to 100644
File size: 2.4 KB
Line 
1#
2#  $Id$
3#
4
5SAMPLE=http
6PGM=${ARCH}/$(SAMPLE).exe
7
8MANAGERS=all
9
10# C source names, if any, go here -- minus the .c
11C_PIECES=init FilesystemImage shttpd_ext
12C_FILES=$(C_PIECES:%=%.c)
13C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
14
15H_FILES=
16
17DOCTYPES=
18DOCS=$(DOCTYPES:%=$(SAMPLE).%)
19
20SRCS=$(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
21OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
22
23PRINT_SRCS=$(DOCS)
24
25PGM=${ARCH}/$(SAMPLE).exe
26
27include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
28include $(RTEMS_CUSTOM)
29include $(PROJECT_ROOT)/make/leaf.cfg
30
31#
32# (OPTIONAL) Add local stuff here using +=
33#
34
35DEFINES  +=
36CPPFLAGS +=
37CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000
38CFLAGS_OPTIMIZE_V   +=
39CFLAGS_DEBUG_V   += -v -qrtems_debug
40
41LD_PATHS  +=
42
43## FYI GoAhead requires POSIX to be enabled
44USE_GOAHEAD=no
45USE_SIMPLE=yes
46USE_FTPD=yes
47ifeq ($(USE_GOAHEAD),yes)
48  HTTPD     = GoAhead Web Server
49  CFLAGS   += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD
50  LD_LIBS  += -lhttpd
51endif
52
53ifeq ($(USE_SIMPLE),yes)
54  HTTPD     = Simple HTTPD Web Server
55  CFLAGS   += -DUSE_SIMPLE_HTTPD
56  LD_LIBS  += -lshttpd
57endif
58
59ifeq ($(USE_FTPD),yes)
60  CFLAGS   += -DUSE_FTPD
61  LD_LIBS  += -lftpd
62endif
63
64LD_LIBS +=
65
66#
67# Add your list of files to delete here.  The config files
68#  already know how to delete some stuff, so you may want
69#  to just run 'make clean' first to see what gets missed.
70#  'make clobber' already includes 'make clean'
71
72
73CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
74CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png
75CLOBBER_ADDITIONS +=
76
77all:    ${ARCH} $(SRCS) $(PGM)
78
79${PGM}: $(OBJS) $(LINK_FILES)
80        $(make-exe)
81
82$(ARCH)/init.o: init.c FilesystemImage.c
83
84FilesystemImage: $(ARCH) stamp-index-html \
85    rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
86        cd rootfs ; \
87            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
88
89FilesystemImage.c: $(ARCH) FilesystemImage
90        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
91
92rootfs/index.html: shttpd_index.html goahead_index.html
93ifeq ($(USE_SIMPLE),yes)
94        cp shttpd_index.html rootfs/index.html
95endif
96ifeq ($(USE_GOHEAD),yes)
97        cp goahead_index.html rootfs/index.html
98endif
99
100stamp-index-html: rootfs/index.html
101ifeq ($(USE_SIMPLE),yes)
102        cp shttpd.png rootfs
103endif
104        touch stamp-index-html
105
106# Install the program(s), appending _g or _p as appropriate.
107# for include files, just use $(INSTALL)
108install:  all
109        $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests
110
Note: See TracBrowser for help on using the repository browser.