1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | @SET_MAKE@ |
---|
6 | srcdir = @srcdir@ |
---|
7 | top_srcdir = @top_srcdir@ |
---|
8 | VPATH = @srcdir@ |
---|
9 | RTEMS_ROOT = @RTEMS_ROOT@ |
---|
10 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
11 | RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg |
---|
12 | |
---|
13 | LIBNAME=libcsupport.a |
---|
14 | LIB=${ARCH}/${LIBNAME} |
---|
15 | |
---|
16 | # C and C++ source names, if any, go here -- minus the .c or .cc |
---|
17 | C_PIECES=__gettod __brk __times malloc syscalls \ |
---|
18 | no_libc newlibc newlibif newlibifr support unixlibc \ |
---|
19 | libio hosterr tcattr termios |
---|
20 | C_FILES=$(C_PIECES:%=%.c) |
---|
21 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
22 | |
---|
23 | H_FILES=$(srcdir)/libcsupport.h |
---|
24 | SYS_H_FILES= |
---|
25 | RTEMS_H_FILES=$(srcdir)/libio.h |
---|
26 | PRIVATE_H_FILES=$(srcdir)/internal.h |
---|
27 | |
---|
28 | INSTALLED_H_FILES=$(srcdir)/libio.h $(srcdir)/libcsupport.h |
---|
29 | SRCS=$(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES) $(PRIVATE_H_FILES) |
---|
30 | OBJS=$(C_O_FILES) |
---|
31 | |
---|
32 | include $(RTEMS_CUSTOM) |
---|
33 | include $(PROJECT_ROOT)/make/lib.cfg |
---|
34 | |
---|
35 | # |
---|
36 | # Add local stuff here using += |
---|
37 | # |
---|
38 | |
---|
39 | DEFINES += |
---|
40 | CPPFLAGS += |
---|
41 | CFLAGS += $(LIBC_DEFINES) |
---|
42 | |
---|
43 | # |
---|
44 | # Add your list of files to delete here. The config files |
---|
45 | # already know how to delete some stuff, so you may want |
---|
46 | # to just run 'make clean' first to see what gets missed. |
---|
47 | # 'make clobber' already includes 'make clean' |
---|
48 | # |
---|
49 | |
---|
50 | CLEAN_ADDITIONS += $(LIB) |
---|
51 | CLOBBER_ADDITIONS += |
---|
52 | |
---|
53 | all: ${ARCH} preinstall $(LIB) |
---|
54 | $(INSTALL_VARIANT) -m 644 ${LIB} ${PROJECT_RELEASE}/lib |
---|
55 | |
---|
56 | $(LIB): $(SRCS) ${OBJS} |
---|
57 | $(make-library) |
---|
58 | |
---|
59 | # Install the library, appending _g or _p as appropriate. |
---|
60 | # for include files, just use $(INSTALL) |
---|
61 | preinstall: |
---|
62 | $(INSTALL) -m 444 ${RTEMS_H_FILES} $(PROJECT_INCLUDE)/rtems |
---|
63 | $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE) |
---|
64 | $(INSTALL) -m 444 $(SYS_H_FILES) $(PROJECT_INCLUDE)/sys |
---|
65 | |
---|
66 | |
---|