[4018538] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | SAMPLE=http |
---|
| 6 | PGM=${ARCH}/$(SAMPLE).exe |
---|
| 7 | |
---|
[f655979] | 8 | MANAGERS=all |
---|
[4018538] | 9 | |
---|
| 10 | # C source names, if any, go here -- minus the .c |
---|
[8c6b033] | 11 | C_PIECES=init FilesystemImage shttpd_ext |
---|
[4018538] | 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) |
---|
[d70b4e7] | 21 | OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) |
---|
[4018538] | 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 | 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 += |
---|
[d51420e] | 42 | |
---|
| 43 | USE_GOHEAD=no |
---|
[d70b4e7] | 44 | USE_SIMPLE=yes |
---|
[d51420e] | 45 | USE_FTPD=yes |
---|
| 46 | ifeq ($(USE_GOHEAD),yes) |
---|
| 47 | HTTPD = GoAhead Web Server |
---|
| 48 | CFLAGS += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD |
---|
| 49 | LD_LIBS += -lhttpd |
---|
| 50 | endif |
---|
| 51 | |
---|
| 52 | ifeq ($(USE_SIMPLE),yes) |
---|
| 53 | HTTPD = Simple HTTPD Web Server |
---|
| 54 | CFLAGS += -DUSE_SIMPLE_HTTPD |
---|
| 55 | LD_LIBS += -lshttpd |
---|
| 56 | endif |
---|
| 57 | |
---|
| 58 | ifeq ($(USE_FTPD),yes) |
---|
| 59 | CFLAGS += -DUSE_FTPD |
---|
| 60 | LD_LIBS += -lftpd |
---|
| 61 | endif |
---|
| 62 | |
---|
[d70b4e7] | 63 | LD_LIBS += |
---|
| 64 | |
---|
[4018538] | 65 | # |
---|
| 66 | # Add your list of files to delete here. The config files |
---|
| 67 | # already know how to delete some stuff, so you may want |
---|
| 68 | # to just run 'make clean' first to see what gets missed. |
---|
| 69 | # 'make clobber' already includes 'make clean' |
---|
| 70 | # |
---|
| 71 | |
---|
[d70b4e7] | 72 | CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h |
---|
[8c6b033] | 73 | CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png |
---|
[4018538] | 74 | CLOBBER_ADDITIONS += |
---|
| 75 | |
---|
| 76 | all: ${ARCH} $(SRCS) $(PGM) |
---|
| 77 | |
---|
[d51420e] | 78 | ${PGM}: $(OBJS) $(LINK_FILES) |
---|
| 79 | $(make-exe) |
---|
| 80 | |
---|
[10c4877] | 81 | $(ARCH)/init.o: init.c FilesystemImage.c |
---|
[d70b4e7] | 82 | |
---|
[8c6b033] | 83 | FilesystemImage: $(ARCH) stamp-index-html \ |
---|
| 84 | rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg |
---|
[d70b4e7] | 85 | cd rootfs ; \ |
---|
| 86 | tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore . |
---|
| 87 | |
---|
| 88 | FilesystemImage.c: $(ARCH) FilesystemImage |
---|
[5c0f2e9] | 89 | $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage |
---|
[d51420e] | 90 | |
---|
[8c6b033] | 91 | rootfs/index.html: shttpd_index.html goahead_index.html |
---|
| 92 | ifeq ($(USE_SIMPLE),yes) |
---|
| 93 | cp shttpd_index.html rootfs/index.html |
---|
| 94 | endif |
---|
| 95 | ifeq ($(USE_GOHEAD),yes) |
---|
| 96 | cp goahead_index.html rootfs/index.html |
---|
| 97 | endif |
---|
| 98 | |
---|
| 99 | stamp-index-html: rootfs/index.html |
---|
| 100 | ifeq ($(USE_SIMPLE),yes) |
---|
| 101 | cp shttpd.png rootfs |
---|
[d51420e] | 102 | endif |
---|
| 103 | touch stamp-index-html |
---|
[4018538] | 104 | |
---|
| 105 | # Install the program(s), appending _g or _p as appropriate. |
---|
| 106 | # for include files, just use $(INSTALL) |
---|
| 107 | install: all |
---|
| 108 | $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests |
---|
[0cbc6db] | 109 | |
---|