1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | # *** NOTE *** This Makefile violates RTEMS Makefile standards. |
---|
5 | # This Makefile picks up sources from outside this directory |
---|
6 | # and installs relocatible objects outside of this directory. |
---|
7 | # This behavior is a work-around for RTEMS Makefile's missing |
---|
8 | # ability to compile inside of directories containing subdirectories. |
---|
9 | # This directory will disapear once automake will be introduced. |
---|
10 | # |
---|
11 | |
---|
12 | @SET_MAKE@ |
---|
13 | srcdir = @srcdir@ |
---|
14 | top_srcdir = @top_srcdir@ |
---|
15 | top_builddir = ../.. |
---|
16 | subdir = i960/wrap |
---|
17 | |
---|
18 | RTEMS_ROOT = @RTEMS_ROOT@ |
---|
19 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
20 | |
---|
21 | VPATH = @srcdir@/.. |
---|
22 | |
---|
23 | RELS = ../$(ARCH)/rtems-cpu.rel |
---|
24 | |
---|
25 | # C source names, if any, go here -- minus the .c |
---|
26 | C_PIECES = cpu |
---|
27 | C_FILES = $(C_PIECES:%=%.c) |
---|
28 | C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) |
---|
29 | |
---|
30 | H_PIECES = asm.h i960RP.h |
---|
31 | H_FILES = $(H_PIECES:%=$(srcdir)/../%) |
---|
32 | |
---|
33 | # Assembly source names, if any, go here -- minus the .S |
---|
34 | S_PIECES = cpu_asm rtems |
---|
35 | S_FILES = $(S_PIECES:%=%.S) |
---|
36 | S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) |
---|
37 | |
---|
38 | SRCS = $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES) |
---|
39 | OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) |
---|
40 | |
---|
41 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
42 | include $(RTEMS_ROOT)/make/leaf.cfg |
---|
43 | |
---|
44 | INSTALL_CHANGE = @INSTALL_CHANGE@ |
---|
45 | mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs |
---|
46 | |
---|
47 | INSTALLDIRS = $(PROJECT_INCLUDE) |
---|
48 | |
---|
49 | $(INSTALLDIRS): |
---|
50 | @$(mkinstalldirs) $(INSTALLDIRS) |
---|
51 | |
---|
52 | # |
---|
53 | # (OPTIONAL) Add local stuff here using += |
---|
54 | # |
---|
55 | |
---|
56 | DEFINES += |
---|
57 | CPPFLAGS += -I$(srcdir)/.. |
---|
58 | CFLAGS += $(CFLAGS_OS_V) |
---|
59 | |
---|
60 | LD_PATHS += |
---|
61 | LD_LIBS += |
---|
62 | LDFLAGS += |
---|
63 | |
---|
64 | # |
---|
65 | # Add your list of files to delete here. The config files |
---|
66 | # already know how to delete some stuff, so you may want |
---|
67 | # to just run 'make clean' first to see what gets missed. |
---|
68 | # 'make clobber' already includes 'make clean' |
---|
69 | # |
---|
70 | |
---|
71 | CLEAN_ADDITIONS += ../$(ARCH) |
---|
72 | CLOBBER_ADDITIONS += |
---|
73 | |
---|
74 | all: ${ARCH} $(SRCS) preinstall $(OBJS) $(ARCH)/rtems.o $(RELS) |
---|
75 | $(INSTALL_VARIANT) -m 644 $(ARCH)/rtems.o $(PROJECT_RELEASE)/lib |
---|
76 | |
---|
77 | ../$(ARCH)/rtems-cpu.rel: $(OBJS) |
---|
78 | test -d ../$(ARCH) || mkdir ../$(ARCH) |
---|
79 | $(make-rel) |
---|
80 | |
---|
81 | # Install the program(s), appending _g or _p as appropriate. |
---|
82 | # for include files, just use $(INSTALL_CHANGE) |
---|
83 | install: all |
---|
84 | |
---|
85 | preinstall: ${ARCH} |
---|
86 | @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE) |
---|
87 | |
---|
88 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
---|
89 | cd $(top_builddir) \ |
---|
90 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|