source: network-demos/http/Makefile @ 7f14725

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since 7f14725 was c2a4686, checked in by Joel Sherrill <joel.sherrill@…>, on 06/22/07 at 19:54:58

2007-06-22 Joel Sherrill <joel.sherrill@…>

  • Makefile, init.c: Clean up. Make name of TARFILE related symbols conditional based upon architecture. Change way desired object format is determined so all BSPs compile this test.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2#  $Id$
3#
4
5SAMPLE=http
6PGM=${ARCH}/$(SAMPLE).exe
7
8MANAGERS=io event semaphore timer rate_monotonic
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)
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   +=
38CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000
39CFLAGS_OPTIMIZE_V   +=
40CFLAGS_DEBUG_V   += -v -qrtems_debug
41
42LD_PATHS  +=
43LD_LIBS   += -lhttpd
44LD_LIBS   += -lftpd
45#NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1  | grep copy: | cut -d':' -f3 | cut -d' ' -f2)
46OBJDUMP=$(OBJCOPY:copy=dump)
47
48#
49# Add your list of files to delete here.  The config files
50#  already know how to delete some stuff, so you may want
51#  to just run 'make clean' first to see what gets missed.
52#  'make clobber' already includes 'make clean'
53#
54
55CLEAN_ADDITIONS += tarfile obj_format
56CLOBBER_ADDITIONS +=
57
58all:    ${ARCH} $(SRCS) $(PGM)
59
60obj_format:
61        $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \
62            sed -e 's/^.*format //' >obj_format
63
64${PGM}: $(OBJS) obj_format $(LINK_FILES)
65        cd rootfs ; tar cf ../$(ARCH)/tarfile web etc
66        cp $(ARCH)/tarfile .
67        $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o
68        $(LD) $(CPU_CFLAGS) -r -o $(ARCH)/temp.o \
69            $(ARCH)/init.o $(ARCH)/tarfile.o
70        $(MV) $(ARCH)/temp.o  $(ARCH)/init.o
71        $(RM) $(ARCH)/temp.o
72        $(make-exe)
73
74# Install the program(s), appending _g or _p as appropriate.
75# for include files, just use $(INSTALL)
76install:  all
77        $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests
Note: See TracBrowser for help on using the repository browser.