source: network-demos/http/Makefile @ 5c0f2e9

4.11network-demos-4-10-branchnetwork-demos-4-9-branch
Last change on this file since 5c0f2e9 was 5c0f2e9, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 9, 2007 at 9:40:42 PM

2007-11-09 Joel Sherrill <joel.sherrill@…>

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