source: network-demos/http/Makefile @ d70b4e7

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since d70b4e7 was d70b4e7, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/07 at 16:26:58

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

  • Makefile: Use bin2c to more reliably turn the tarfile into a linkable object file. Ignore .cvsignore when making tarfile.
  • init.c: Clean up tarfile symbol definitions.
  • .cvsignore, rootfs/.cvsignore: New files.
  • 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
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
43#NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1  | grep copy: | cut -d':' -f3 | cut -d' ' -f2)
44OBJDUMP=$(OBJCOPY:copy=dump)
45
46USE_GOHEAD=no
47USE_SIMPLE=yes
48USE_FTPD=yes
49ifeq ($(USE_GOHEAD),yes)
50  HTTPD     = GoAhead Web Server
51  CFLAGS   += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD
52  LD_LIBS  += -lhttpd
53endif
54
55ifeq ($(USE_SIMPLE),yes)
56  HTTPD     = Simple HTTPD Web Server
57  CFLAGS   += -DUSE_SIMPLE_HTTPD
58  LD_LIBS  += -lshttpd
59endif
60
61ifeq ($(USE_FTPD),yes)
62  CFLAGS   += -DUSE_FTPD
63  LD_LIBS  += -lftpd
64endif
65
66LD_LIBS +=
67
68#
69# Add your list of files to delete here.  The config files
70#  already know how to delete some stuff, so you may want
71#  to just run 'make clean' first to see what gets missed.
72#  'make clobber' already includes 'make clean'
73#
74
75CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
76CLEAN_ADDIRIONS += stamp-index-html rootfs/index.html
77CLOBBER_ADDITIONS +=
78
79# strip out flags gcc knows but LD doesn't like -- add as needed
80LD_CPU_CFLAGS=$(CPU_CFLAGS:-mstrict-align:)
81
82COPY_ARCH=$(shell echo $(OBJCOPY) | cut -d'-' -f1)
83
84all:    ${ARCH} $(SRCS) $(PGM)
85
86${PGM}: $(OBJS) $(LINK_FILES)
87        $(make-exe)
88
89
90$(ARCH)/init.c: init.c FilesystemImage.c
91
92FilesystemImage: $(ARCH) stamp-index-html
93        cd rootfs ; \
94            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
95
96FilesystemImage.c: $(ARCH) FilesystemImage
97        $(PROJECT_ROOT)/bin/bin2c FilesystemImage FilesystemImage
98
99stamp-index-html: index.html.in
100ifneq ($(HTTPD),)
101        sed -e 's/@SERVER@/$(HTTPD)/' <index.html.in >rootfs/index.html
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.