source: network-demos/http/Makefile @ de1db33

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since de1db33 was eb241c3, checked in by Joel Sherrill <joel.sherrill@…>, on 07/18/07 at 19:34:43

2007-07-18 Joel Sherrill <joel.sherrill@…>

  • Makefile: Eliminate unneeded temp.o
  • Property mode set to 100644
File size: 2.3 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
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) $(ARCH)/tarfile.o
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=no
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
66#
67# Add your list of files to delete here.  The config files
68#  already know how to delete some stuff, so you may want
69#  to just run 'make clean' first to see what gets missed.
70#  'make clobber' already includes 'make clean'
71#
72
73CLEAN_ADDITIONS += tarfile obj_format stamp-index-html rootfs/index.html
74CLOBBER_ADDITIONS +=
75
76# strip out flags gcc knows but LD doesn't like -- add as needed
77LD_CPU_CFLAGS=$(CPU_CFLAGS:-mstrict-align:)
78
79all:    ${ARCH} $(SRCS) $(PGM)
80
81obj_format:
82        $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \
83            sed -e 's/^.*format //' >obj_format
84
85${PGM}: $(OBJS) $(LINK_FILES)
86        $(make-exe)
87
88$(ARCH)/tarfile.o: $(ARCH) stamp-index-html obj_format
89        cd rootfs ; tar cf ../$(ARCH)/tarfile --exclude CVS .
90        cp $(ARCH)/tarfile .
91        $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o
92
93stamp-index-html: index.html.in
94ifneq ($(HTTPD),)
95        sed -e 's/@SERVER@/$(HTTPD)/' <index.html.in >rootfs/index.html
96endif
97        touch stamp-index-html
98
99# Install the program(s), appending _g or _p as appropriate.
100# for include files, just use $(INSTALL)
101install:  all
102        $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests
Note: See TracBrowser for help on using the repository browser.