source: network-demos/http/Makefile @ 0fe6b0d

4.11network-demos-4-10-branch
Last change on this file since 0fe6b0d was 0fe6b0d, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 23, 2009 at 2:31:53 PM

2009-11-23 Joel Sherrill <joel.sherrill@…>

  • Makefile, goahead_index.html, init.c, shttpd_ext.c, shttpd_index.html: Add Mongoose HTTPD support.
  • mongoose_ext.c, mongoose_index.html: New files.
  • Property mode set to 100644
File size: 2.7 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 mongoose_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
35override DEFINES  +=
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=no
46USE_MONGOOSE=yes
47USE_FTPD=yes
48ifeq ($(USE_GOAHEAD),yes)
49  HTTPD     = GoAhead Web Server
50  CFLAGS   += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD
51  override LD_LIBS  += -lhttpd
52endif
53
54ifeq ($(USE_SIMPLE),yes)
55  HTTPD     = Simple HTTPD Web Server
56  CFLAGS   += -DUSE_SIMPLE_HTTPD
57  override LD_LIBS  += -lshttpd
58endif
59
60ifeq ($(USE_MONGOOSE),yes)
61  HTTPD     = Mongoose HTTPD Web Server
62  CFLAGS   += -DUSE_MONGOOSE_HTTPD
63  override LD_LIBS  += -lmghttpd
64endif
65
66ifeq ($(USE_FTPD),yes)
67  CFLAGS   += -DUSE_FTPD
68  override LD_LIBS  += -lftpd
69endif
70
71#
72# Add your list of files to delete here.  The config files
73#  already know how to delete some stuff, so you may want
74#  to just run 'make clean' first to see what gets missed.
75#  'make clobber' already includes 'make clean'
76
77
78CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
79CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png
80CLOBBER_ADDITIONS +=
81
82all:    ${ARCH} $(SRCS) $(PGM)
83
84${PGM}: $(OBJS) $(LINK_FILES)
85        $(make-exe)
86
87$(ARCH)/init.o: init.c FilesystemImage.c
88
89FilesystemImage: $(ARCH) stamp-index-html \
90    rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
91        cd rootfs ; \
92            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
93
94FilesystemImage.c: $(ARCH) FilesystemImage
95        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
96
97rootfs/index.html: shttpd_index.html goahead_index.html mongoose_index.html
98ifeq ($(USE_SIMPLE),yes)
99        cp shttpd_index.html rootfs/index.html
100endif
101ifeq ($(USE_GOHEAD),yes)
102        cp goahead_index.html rootfs/index.html
103endif
104ifeq ($(USE_MONGOOSE),yes)
105        cp mongoose_index.html rootfs/index.html
106endif
107
108stamp-index-html: rootfs/index.html
109ifeq ($(USE_SIMPLE),yes)
110        cp shttpd.png rootfs
111endif
112        touch stamp-index-html
113
114# Install the program(s), appending _g or _p as appropriate.
115# for include files, just use $(INSTALL)
116install:  all
117        $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests
118
Note: See TracBrowser for help on using the repository browser.