1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | @SET_MAKE@ |
---|
6 | srcdir = @srcdir@ |
---|
7 | top_srcdir = @top_srcdir@ |
---|
8 | top_builddir = ../../.. |
---|
9 | subdir = i386/pc386/wrapup |
---|
10 | |
---|
11 | RTEMS_ROOT = @RTEMS_ROOT@ |
---|
12 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
13 | |
---|
14 | VPATH = @srcdir@ |
---|
15 | |
---|
16 | # We only build the Network library if HAS_NETWORKING was defined |
---|
17 | NETWORK_yes_V = dec21140 ne2000 wd8003 3c509 |
---|
18 | NETWORK = $(NETWORK_$(HAS_NETWORKING)_V) |
---|
19 | |
---|
20 | BSP_PIECES = startup clock console timer $(NETWORK) |
---|
21 | GENERIC_PIECES = |
---|
22 | |
---|
23 | # bummer; have to use $foreach since % pattern subst rules only replace 1x |
---|
24 | OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \ |
---|
25 | $(foreach piece, $(GENERIC_PIECES), \ |
---|
26 | ../../../$(piece)/$(ARCH)/$(piece).rel) |
---|
27 | LIB = $(ARCH)/libbsp.a |
---|
28 | |
---|
29 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
30 | include $(RTEMS_ROOT)/make/lib.cfg |
---|
31 | |
---|
32 | INSTALL = @INSTALL@ |
---|
33 | INSTALL_CHANGE = @INSTALL_CHANGE@ |
---|
34 | mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs |
---|
35 | |
---|
36 | INSTALLDIRS = $(PROJECT_RELEASE)/BootImgs |
---|
37 | |
---|
38 | $(INSTALLDIRS): |
---|
39 | @$(mkinstalldirs) $(INSTALLDIRS) |
---|
40 | |
---|
41 | # |
---|
42 | # (OPTIONAL) Add local stuff here using += |
---|
43 | # |
---|
44 | |
---|
45 | DEFINES += |
---|
46 | CPPFLAGS += |
---|
47 | CFLAGS += |
---|
48 | |
---|
49 | LD_PATHS += |
---|
50 | LD_LIBS += |
---|
51 | LDFLAGS += |
---|
52 | |
---|
53 | # |
---|
54 | # Add your list of files to delete here. The config files |
---|
55 | # already know how to delete some stuff, so you may want |
---|
56 | # to just run 'make clean' first to see what gets missed. |
---|
57 | # 'make clobber' already includes 'make clean' |
---|
58 | # |
---|
59 | |
---|
60 | CLEAN_ADDITIONS += |
---|
61 | CLOBBER_ADDITIONS += |
---|
62 | |
---|
63 | $(LIB): ${OBJS} |
---|
64 | $(make-library) |
---|
65 | |
---|
66 | all: preinstall ${ARCH} $(SRCS) $(LIB) |
---|
67 | $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib |
---|
68 | |
---|
69 | # HACK: |
---|
70 | # we create here a directory specific to the PC386 BSP to store the BootImage |
---|
71 | # files so they can be easily found |
---|
72 | preinstall: $(INSTALLDIRS) |
---|
73 | $(mkinstalldirs) $(INSTALLDIRS) |
---|
74 | |
---|
75 | $(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs: ../bsp_specs |
---|
76 | $(INSTALL_DATA) $< $@ |
---|
77 | |
---|
78 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
---|
79 | cd $(top_builddir) \ |
---|
80 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|