source: network-demos/http/Makefile @ a6ab732

network-demos-4-9-branch network-demos-4-9-6
Last change on this file since a6ab732 was fe2286e, checked in by Joel Sherrill <joel.sherrill@…>, on 05/18/09 at 17:50:40

2009-05-18 Joel Sherrill <joel.sherrill@…>

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