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 11/09/07 at 21:40:42

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

  • Makefile: bin2c now rtems-bin2c.
  • Property mode set to 100644
File size: 2.4 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
[8c6b033]11C_PIECES=init FilesystemImage shttpd_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
35DEFINES  +=
36CPPFLAGS +=
37CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000
38CFLAGS_OPTIMIZE_V   +=
39CFLAGS_DEBUG_V   += -v -qrtems_debug
40
41LD_PATHS  +=
[d51420e]42
43USE_GOHEAD=no
[d70b4e7]44USE_SIMPLE=yes
[d51420e]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
[d70b4e7]63LD_LIBS +=
64
[4018538]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
[d70b4e7]72CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
[8c6b033]73CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png
[4018538]74CLOBBER_ADDITIONS +=
75
76all:    ${ARCH} $(SRCS) $(PGM)
77
[d51420e]78${PGM}: $(OBJS) $(LINK_FILES)
79        $(make-exe)
80
[10c4877]81$(ARCH)/init.o: init.c FilesystemImage.c
[d70b4e7]82
[8c6b033]83FilesystemImage: $(ARCH) stamp-index-html \
84    rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
[d70b4e7]85        cd rootfs ; \
86            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
87
88FilesystemImage.c: $(ARCH) FilesystemImage
[5c0f2e9]89        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
[d51420e]90
[8c6b033]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
[d51420e]102endif
103        touch stamp-index-html
[4018538]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
[0cbc6db]109
Note: See TracBrowser for help on using the repository browser.