1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | @SET_MAKE@ |
---|
6 | srcdir = @srcdir@ |
---|
7 | top_srcdir = @top_srcdir@ |
---|
8 | top_builddir = .. |
---|
9 | subdir = rtc |
---|
10 | |
---|
11 | RTEMS_ROOT = @RTEMS_ROOT@ |
---|
12 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
13 | |
---|
14 | VPATH = @srcdir@ |
---|
15 | |
---|
16 | LIBNAME = librtcio.a |
---|
17 | LIB = ${ARCH}/${LIBNAME} |
---|
18 | |
---|
19 | C_PIECES = rtcprobe icm7170 icm7170_reg icm7170_reg2 icm7170_reg4 \ |
---|
20 | icm7170_reg8 m48t08 m48t08_reg m48t08_reg2 m48t08_reg4 m48t08_reg8 |
---|
21 | |
---|
22 | C_FILES = $(C_PIECES:%=%.c) |
---|
23 | C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) |
---|
24 | |
---|
25 | INSTALLED_H_FILES = $(srcdir)/rtc.h $(srcdir)/icm7170.h $(srcdir)/m48t08.h |
---|
26 | |
---|
27 | SRCS = $(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES) \ |
---|
28 | $(PRIVATE_H_FILES) |
---|
29 | OBJS = $(C_O_FILES) |
---|
30 | |
---|
31 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
32 | include $(RTEMS_ROOT)/make/lib.cfg |
---|
33 | |
---|
34 | INSTALL_CHANGE = @INSTALL_CHANGE@ |
---|
35 | mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs |
---|
36 | |
---|
37 | INSTALLDIRS = $(PROJECT_INCLUDE)/libchip |
---|
38 | |
---|
39 | $(INSTALLDIRS): |
---|
40 | @$(mkinstalldirs) $(INSTALLDIRS) |
---|
41 | |
---|
42 | # |
---|
43 | # Add local stuff here using += |
---|
44 | # |
---|
45 | |
---|
46 | DEFINES += |
---|
47 | CPPFLAGS += |
---|
48 | CFLAGS += $(LIBC_DEFINES) |
---|
49 | |
---|
50 | # |
---|
51 | # Add your list of files to delete here. The config files |
---|
52 | # already know how to delete some stuff, so you may want |
---|
53 | # to just run 'make clean' first to see what gets missed. |
---|
54 | # 'make clobber' already includes 'make clean' |
---|
55 | # |
---|
56 | |
---|
57 | CLEAN_ADDITIONS += $(LIB) |
---|
58 | CLOBBER_ADDITIONS += |
---|
59 | |
---|
60 | all: ${ARCH} preinstall $(LIB) |
---|
61 | $(INSTALL_VARIANT) -m 644 ${LIB} $(PROJECT_RELEASE)/lib |
---|
62 | |
---|
63 | $(LIB): $(SRCS) ${OBJS} |
---|
64 | $(make-library) |
---|
65 | |
---|
66 | # Install the library, appending _g or _p as appropriate. |
---|
67 | # for include files, just use $(INSTALL_CHANGE) |
---|
68 | preinstall: |
---|
69 | @$(mkinstalldirs) $(PROJECT_INCLUDE)/libchip |
---|
70 | @$(INSTALL_CHANGE) -m 644 $(INSTALLED_H_FILES) $(PROJECT_INCLUDE)/libchip |
---|
71 | |
---|
72 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
---|
73 | cd $(top_builddir) \ |
---|
74 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|