1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | SAMPLE=http |
---|
6 | PGM=${ARCH}/$(SAMPLE).exe |
---|
7 | |
---|
8 | MANAGERS=all |
---|
9 | |
---|
10 | # C source names, if any, go here -- minus the .c |
---|
11 | C_PIECES=init FilesystemImage shttpd_ext |
---|
12 | C_FILES=$(C_PIECES:%=%.c) |
---|
13 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
14 | |
---|
15 | H_FILES= |
---|
16 | |
---|
17 | DOCTYPES= |
---|
18 | DOCS=$(DOCTYPES:%=$(SAMPLE).%) |
---|
19 | |
---|
20 | SRCS=$(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) |
---|
21 | OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) |
---|
22 | |
---|
23 | PRINT_SRCS=$(DOCS) |
---|
24 | |
---|
25 | PGM=${ARCH}/$(SAMPLE).exe |
---|
26 | |
---|
27 | include $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
28 | include $(RTEMS_CUSTOM) |
---|
29 | include $(PROJECT_ROOT)/make/leaf.cfg |
---|
30 | |
---|
31 | # |
---|
32 | # (OPTIONAL) Add local stuff here using += |
---|
33 | # |
---|
34 | |
---|
35 | override DEFINES += |
---|
36 | CPPFLAGS += |
---|
37 | CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 |
---|
38 | CFLAGS_OPTIMIZE_V += |
---|
39 | CFLAGS_DEBUG_V += -v -qrtems_debug |
---|
40 | |
---|
41 | LD_PATHS += |
---|
42 | |
---|
43 | ## FYI GoAhead requires POSIX to be enabled |
---|
44 | USE_GOHEAD=no |
---|
45 | USE_SIMPLE=yes |
---|
46 | USE_FTPD=yes |
---|
47 | ifeq ($(USE_GOHEAD),yes) |
---|
48 | HTTPD = GoAhead Web Server |
---|
49 | CFLAGS += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD |
---|
50 | override LD_LIBS += -lhttpd |
---|
51 | endif |
---|
52 | |
---|
53 | ifeq ($(USE_SIMPLE),yes) |
---|
54 | HTTPD = Simple HTTPD Web Server |
---|
55 | CFLAGS += -DUSE_SIMPLE_HTTPD |
---|
56 | override LD_LIBS += -lshttpd |
---|
57 | endif |
---|
58 | |
---|
59 | ifeq ($(USE_FTPD),yes) |
---|
60 | CFLAGS += -DUSE_FTPD |
---|
61 | override LD_LIBS += -lftpd |
---|
62 | endif |
---|
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 | |
---|
71 | CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h |
---|
72 | CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png |
---|
73 | CLOBBER_ADDITIONS += |
---|
74 | |
---|
75 | all: ${ARCH} $(SRCS) $(PGM) |
---|
76 | |
---|
77 | ${PGM}: $(OBJS) $(LINK_FILES) |
---|
78 | $(make-exe) |
---|
79 | |
---|
80 | $(ARCH)/init.o: init.c FilesystemImage.c |
---|
81 | |
---|
82 | FilesystemImage: $(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 | |
---|
87 | FilesystemImage.c: $(ARCH) FilesystemImage |
---|
88 | $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage |
---|
89 | |
---|
90 | rootfs/index.html: shttpd_index.html goahead_index.html |
---|
91 | ifeq ($(USE_SIMPLE),yes) |
---|
92 | cp shttpd_index.html rootfs/index.html |
---|
93 | endif |
---|
94 | ifeq ($(USE_GOHEAD),yes) |
---|
95 | cp goahead_index.html rootfs/index.html |
---|
96 | endif |
---|
97 | |
---|
98 | stamp-index-html: rootfs/index.html |
---|
99 | ifeq ($(USE_SIMPLE),yes) |
---|
100 | cp shttpd.png rootfs |
---|
101 | endif |
---|
102 | touch stamp-index-html |
---|
103 | |
---|
104 | # Install the program(s), appending _g or _p as appropriate. |
---|
105 | # for include files, just use $(INSTALL) |
---|
106 | install: all |
---|
107 | $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests |
---|
108 | |
---|