[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 |
---|
| 11 | C_PIECES=init |
---|
| 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 | DEFINES += |
---|
| 36 | CPPFLAGS += |
---|
[f655979] | 37 | CFLAGS += -DWEBS -DUEMF |
---|
[4018538] | 38 | CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 |
---|
| 39 | CFLAGS_OPTIMIZE_V += |
---|
| 40 | CFLAGS_DEBUG_V += -v -qrtems_debug |
---|
| 41 | |
---|
| 42 | LD_PATHS += |
---|
[cf5b3fa] | 43 | LD_LIBS += -lhttpd |
---|
| 44 | LD_LIBS += -lftpd |
---|
[c2a4686] | 45 | #NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1 | grep copy: | cut -d':' -f3 | cut -d' ' -f2) |
---|
| 46 | OBJDUMP=$(OBJCOPY:copy=dump) |
---|
[4018538] | 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 | |
---|
[c2a4686] | 55 | CLEAN_ADDITIONS += tarfile obj_format |
---|
[4018538] | 56 | CLOBBER_ADDITIONS += |
---|
| 57 | |
---|
[f655979] | 58 | # strip out flags gcc knows but LD doesn't like -- add as needed |
---|
| 59 | LD_CPU_CFLAGS=$(CPU_CFLAGS:-mstrict-align:) |
---|
| 60 | |
---|
[4018538] | 61 | all: ${ARCH} $(SRCS) $(PGM) |
---|
| 62 | |
---|
[c2a4686] | 63 | obj_format: |
---|
| 64 | $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \ |
---|
| 65 | sed -e 's/^.*format //' >obj_format |
---|
| 66 | |
---|
| 67 | ${PGM}: $(OBJS) obj_format $(LINK_FILES) |
---|
[f655979] | 68 | cd rootfs ; tar cf ../$(ARCH)/tarfile --exclude CVS . |
---|
[1a1b41cd] | 69 | cp $(ARCH)/tarfile . |
---|
[c2a4686] | 70 | $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o |
---|
[f655979] | 71 | $(LD) $(LD_CPU_CFLAGS) -r -o $(ARCH)/temp.o \ |
---|
[c2a4686] | 72 | $(ARCH)/init.o $(ARCH)/tarfile.o |
---|
[4018538] | 73 | $(MV) $(ARCH)/temp.o $(ARCH)/init.o |
---|
| 74 | $(RM) $(ARCH)/temp.o |
---|
| 75 | $(make-exe) |
---|
| 76 | |
---|
| 77 | # Install the program(s), appending _g or _p as appropriate. |
---|
| 78 | # for include files, just use $(INSTALL) |
---|
| 79 | install: all |
---|
| 80 | $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests |
---|