source: network-demos/http/Makefile

Last change on this file was af6a124, checked in by Joel Sherrill <joel.sherrill@…>, on May 15, 2012 at 9:23:55 PM

network-demos - Remove CVS Ids (scripted)

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