[bffb938] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | # Templates/Makefile.lib |
---|
| 5 | # Template library Makefile |
---|
| 6 | # |
---|
| 7 | |
---|
| 8 | LIBNAME=libfoo.a # xxx- your library names goes here |
---|
| 9 | LIB=${ARCH}/${LIBNAME} |
---|
| 10 | |
---|
| 11 | # C and C++ source names, if any, go here -- minus the .c or .cc |
---|
| 12 | C_PIECES=xxxd xxxe xxxf |
---|
| 13 | C_FILES=$(C_PIECES:%=%.c) |
---|
| 14 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
| 15 | |
---|
| 16 | CC_PIECES=xxxa xxxb xxxc |
---|
| 17 | CC_FILES=$(CC_PIECES:%=%.cc) |
---|
| 18 | CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) |
---|
| 19 | |
---|
| 20 | H_FILES= |
---|
| 21 | |
---|
| 22 | # Assembly source names, if any, go here -- minus the .s |
---|
| 23 | S_PIECES= |
---|
| 24 | S_FILES=$(S_PIECES:%=%.s) |
---|
| 25 | S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o) |
---|
| 26 | |
---|
| 27 | SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) |
---|
| 28 | OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) |
---|
| 29 | |
---|
[5c3511e] | 30 | include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg |
---|
[bffb938] | 31 | include $(RTEMS_ROOT)/make/lib.cfg |
---|
| 32 | |
---|
| 33 | # |
---|
| 34 | # Add local stuff here using += |
---|
| 35 | # |
---|
| 36 | |
---|
| 37 | DEFINES += |
---|
| 38 | CPPFLAGS += |
---|
| 39 | CFLAGS += |
---|
| 40 | |
---|
| 41 | # |
---|
| 42 | # Add your list of files to delete here. The config files |
---|
| 43 | # already know how to delete some stuff, so you may want |
---|
| 44 | # to just run 'make clean' first to see what gets missed. |
---|
| 45 | # 'make clobber' already includes 'make clean' |
---|
| 46 | # |
---|
| 47 | |
---|
| 48 | CLEAN_ADDITIONS += xxx-your-debris-goes-here |
---|
| 49 | CLOBBER_ADDITIONS += |
---|
| 50 | |
---|
| 51 | all: ${ARCH} $(SRCS) $(LIB) |
---|
| 52 | |
---|
| 53 | $(LIB): ${OBJS} |
---|
| 54 | $(make-library) |
---|
| 55 | |
---|
| 56 | # Install the library, appending _g or _p as appropriate. |
---|
| 57 | # for include files, just use $(INSTALL) |
---|
| 58 | install: all |
---|
| 59 | $(INSTALL_VARIANT) -m 644 ${LIB} ${PROJECT_RELEASE}/lib |
---|