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 11/23/09 at 14:31:53

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
RevLine 
[4018538]1#
2#  $Id$
3#
4
5SAMPLE=http
6PGM=${ARCH}/$(SAMPLE).exe
7
[f655979]8MANAGERS=all
[4018538]9
10# C source names, if any, go here -- minus the .c
[0fe6b0d]11C_PIECES=init FilesystemImage shttpd_ext mongoose_ext
[4018538]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)
[d70b4e7]21OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
[4018538]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
[5d2c26f]35override DEFINES  +=
[4018538]36CPPFLAGS +=
37CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000
38CFLAGS_OPTIMIZE_V   +=
39CFLAGS_DEBUG_V   += -v -qrtems_debug
40
41LD_PATHS  +=
[d51420e]42
[6bfe512]43## FYI GoAhead requires POSIX to be enabled
[d7de1ab]44USE_GOAHEAD=no
[0fe6b0d]45USE_SIMPLE=no
46USE_MONGOOSE=yes
[d51420e]47USE_FTPD=yes
[d7de1ab]48ifeq ($(USE_GOAHEAD),yes)
[d51420e]49  HTTPD     = GoAhead Web Server
50  CFLAGS   += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD
[85ed672]51  override LD_LIBS  += -lhttpd
[d51420e]52endif
53
54ifeq ($(USE_SIMPLE),yes)
55  HTTPD     = Simple HTTPD Web Server
56  CFLAGS   += -DUSE_SIMPLE_HTTPD
[85ed672]57  override LD_LIBS  += -lshttpd
[d51420e]58endif
59
[0fe6b0d]60ifeq ($(USE_MONGOOSE),yes)
61  HTTPD     = Mongoose HTTPD Web Server
62  CFLAGS   += -DUSE_MONGOOSE_HTTPD
63  override LD_LIBS  += -lmghttpd
64endif
65
[d51420e]66ifeq ($(USE_FTPD),yes)
67  CFLAGS   += -DUSE_FTPD
[85ed672]68  override LD_LIBS  += -lftpd
[d51420e]69endif
70
[4018538]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'
[d7de1ab]76
[4018538]77
[d70b4e7]78CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
[8c6b033]79CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png
[4018538]80CLOBBER_ADDITIONS +=
81
82all:    ${ARCH} $(SRCS) $(PGM)
83
[d51420e]84${PGM}: $(OBJS) $(LINK_FILES)
85        $(make-exe)
86
[10c4877]87$(ARCH)/init.o: init.c FilesystemImage.c
[d70b4e7]88
[8c6b033]89FilesystemImage: $(ARCH) stamp-index-html \
90    rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
[d70b4e7]91        cd rootfs ; \
92            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
93
94FilesystemImage.c: $(ARCH) FilesystemImage
[5c0f2e9]95        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
[d51420e]96
[0fe6b0d]97rootfs/index.html: shttpd_index.html goahead_index.html mongoose_index.html
[8c6b033]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
[0fe6b0d]104ifeq ($(USE_MONGOOSE),yes)
105        cp mongoose_index.html rootfs/index.html
106endif
[8c6b033]107
108stamp-index-html: rootfs/index.html
109ifeq ($(USE_SIMPLE),yes)
110        cp shttpd.png rootfs
[d51420e]111endif
112        touch stamp-index-html
[4018538]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
[0cbc6db]118
Note: See TracBrowser for help on using the repository browser.