[bffb938] | 1 | # |
---|
| 2 | # Template leaf node Makefile |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | # C source names, if any, go here -- minus the .c |
---|
| 6 | C_PIECES=xxxd xxxe xxxf |
---|
| 7 | C_FILES=$(C_PIECES:%=%.c) |
---|
| 8 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
| 9 | |
---|
| 10 | # C++ source names, if any, go here -- minus the .cc |
---|
| 11 | CC_PIECES=xxxa xxxb xxxc |
---|
| 12 | CC_FILES=$(CC_PIECES:%=%.cc) |
---|
| 13 | CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) |
---|
| 14 | |
---|
| 15 | H_FILES= |
---|
| 16 | |
---|
[0162910] | 17 | # Assembly source names, if any, go here -- minus the .S |
---|
[bffb938] | 18 | S_PIECES= |
---|
[0162910] | 19 | S_FILES=$(S_PIECES:%=%.S) |
---|
| 20 | S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) |
---|
[bffb938] | 21 | |
---|
| 22 | SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) |
---|
| 23 | OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) |
---|
| 24 | |
---|
| 25 | PGMS=${ARCH}/xxx-your-program-here ${ARCH}/xxx-another-one |
---|
| 26 | |
---|
[df49c60] | 27 | include $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
| 28 | include $(RTEMS_CUSTOM) |
---|
[bffb938] | 29 | include $(RTEMS_ROOT)/make/leaf.cfg |
---|
| 30 | |
---|
| 31 | # |
---|
| 32 | # (OPTIONAL) Add local stuff here using += |
---|
| 33 | # |
---|
| 34 | |
---|
| 35 | DEFINES += |
---|
| 36 | CPPFLAGS += |
---|
| 37 | CFLAGS += |
---|
| 38 | |
---|
[a858910] | 39 | # |
---|
| 40 | # CFLAGS_DEBUG_V are used when the `make debug' target is built. |
---|
| 41 | # |
---|
| 42 | |
---|
[bffb938] | 43 | LD_PATHS += xxx-your-EXTRA-library-paths-go-here, if any |
---|
| 44 | LD_LIBS += xxx-your-libraries-go-here eg: -lvx |
---|
| 45 | LDFLAGS += |
---|
| 46 | |
---|
| 47 | # |
---|
| 48 | # Add your list of files to delete here. The config files |
---|
| 49 | # already know how to delete some stuff, so you may want |
---|
| 50 | # to just run 'make clean' first to see what gets missed. |
---|
| 51 | # 'make clobber' already includes 'make clean' |
---|
| 52 | # |
---|
| 53 | |
---|
| 54 | CLEAN_ADDITIONS += xxx-your-debris-goes-here |
---|
| 55 | CLOBBER_ADDITIONS += |
---|
| 56 | |
---|
| 57 | all: ${ARCH} $(SRCS) $(PGMS) |
---|
| 58 | |
---|
[2b2cfb7] | 59 | # The following links using C rules. |
---|
[bffb938] | 60 | ${ARCH}/xxx-your-program-here: ${OBJS} ${LINK_FILES} |
---|
| 61 | $(make-exe) |
---|
| 62 | |
---|
[2b2cfb7] | 63 | # The following links using C++ rules to get the C++ libraries. |
---|
| 64 | # Be sure you BSP has a make-cxx-exe rule if you use this. |
---|
| 65 | # ${ARCH}/xxx-your-program-here: ${OBJS} ${LINK_FILES} |
---|
| 66 | # $(make-cxx-exe) |
---|
| 67 | |
---|
[bffb938] | 68 | # Install the program(s), appending _g or _p as appropriate. |
---|
[8548fe0] | 69 | # for include files, just use $(INSTALL_CHANGE) |
---|
[bffb938] | 70 | install: all |
---|
| 71 | $(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin |
---|