1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | AUTOMAKE_OPTIONS = foreign 1.4 |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
8 | include $(RTEMS_ROOT)/make/leaf.cfg |
---|
9 | |
---|
10 | # We only build multiprocessing related files if HAS_MP was defined |
---|
11 | MP_H_FILES = mpci.h mppkt.h objectmp.h threadmp.h |
---|
12 | |
---|
13 | # H_FILES that get installed in the rtems/score subdirectoy |
---|
14 | STD_H_FILES = address.h apiext.h bitfield.h chain.h context.h copyrt.h coremsg.h \ |
---|
15 | coremutex.h coresem.h heap.h interr.h isr.h object.h priority.h stack.h \ |
---|
16 | states.h sysstate.h thread.h threadq.h tod.h tqdata.h userext.h \ |
---|
17 | watchdog.h wkspace.h |
---|
18 | TARGOPTS = targopts.h |
---|
19 | |
---|
20 | if HAS_MP |
---|
21 | H_FILES = $(STD_H_FILES) $(TARGOPTS) $(MP_H_FILES) |
---|
22 | else |
---|
23 | H_FILES = $(STD_H_FILES) $(TARGOPTS) |
---|
24 | endif |
---|
25 | |
---|
26 | PREINSTALL_FILES = \ |
---|
27 | $(PROJECT_INCLUDE)/rtems/score \ |
---|
28 | $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) |
---|
29 | |
---|
30 | $(PROJECT_INCLUDE)/rtems/score: |
---|
31 | @$(mkinstalldirs) $@ |
---|
32 | |
---|
33 | $(PROJECT_INCLUDE)/rtems/score/%.h: %.h |
---|
34 | $(INSTALL_DATA) $< $@ |
---|
35 | |
---|
36 | # |
---|
37 | # Add your list of files to delete here. The config files |
---|
38 | # already know how to delete some stuff, so you may want |
---|
39 | # to just run 'make clean' first to see what gets missed. |
---|
40 | # 'make clobber' already includes 'make clean' |
---|
41 | # |
---|
42 | |
---|
43 | CLEANFILES += $(TARGOPTS) |
---|
44 | |
---|
45 | # Until RTEMS_CPU is removed from all the make configuration files, |
---|
46 | # this will need to be here to transform hppa1.1 into hppa1_1 to |
---|
47 | # make it a valid cpp symbol. At some point in the near future, |
---|
48 | # targopts.h should not define RTEMS_CPU. As best I can tell, |
---|
49 | # gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL |
---|
50 | # on some families but not on others. For example, the i386 |
---|
51 | # family does not give us enough information from the predefines. |
---|
52 | RTEMS_CPU_DEFINED = $(subst .,_,$(RTEMS_CPU)) |
---|
53 | |
---|
54 | # make the target dependent options file |
---|
55 | $(TARGOPTS): |
---|
56 | @echo "/* target board dependent options file */" >$@ |
---|
57 | @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@ |
---|
58 | @echo >>$@ |
---|
59 | @echo "#ifndef __TARGET_OPTIONS_h" >>$@ |
---|
60 | @echo "#define __TARGET_OPTIONS_h" >>$@ |
---|
61 | @echo >>$@ |
---|
62 | @echo "#ifdef $(RTEMS_CPU_DEFINED)" >>$@ |
---|
63 | @echo "#undef $(RTEMS_CPU_DEFINED)" >>$@ |
---|
64 | @echo "#endif" >>$@ |
---|
65 | @echo "#define $(RTEMS_CPU_DEFINED) 1" >>$@ |
---|
66 | @echo >>$@ |
---|
67 | @echo "#ifdef $(RTEMS_CPU_MODEL)" >>$@ |
---|
68 | @echo "#undef $(RTEMS_CPU_MODEL)" >>$@ |
---|
69 | @echo "#endif" >>$@ |
---|
70 | @echo "#define $(RTEMS_CPU_MODEL) 1" >>$@ |
---|
71 | @echo >>$@ |
---|
72 | @echo "#ifdef @RTEMS_BSP@" >>$@ |
---|
73 | @echo "#undef @RTEMS_BSP@" >>$@ |
---|
74 | @echo "#endif" >>$@ |
---|
75 | @echo "#define @RTEMS_BSP@ 1" >>$@ |
---|
76 | @echo >>$@ |
---|
77 | @$(make-target-options) |
---|
78 | @if test "$(RTEMS_USE_MACROS)" = "yes"; then \ |
---|
79 | echo "#define USE_MACROS 1" >>$@; \ |
---|
80 | else \ |
---|
81 | echo "#define USE_INLINES 1" >>$@; \ |
---|
82 | fi |
---|
83 | @if test "$(HAS_MP)" = "yes"; then \ |
---|
84 | echo "#define RTEMS_MULTIPROCESSING 1" >>$@; \ |
---|
85 | fi |
---|
86 | @if test "$(HAS_POSIX_API)" = "yes"; then \ |
---|
87 | echo "#define RTEMS_POSIX_API 1" >>$@; \ |
---|
88 | fi |
---|
89 | @if test "$(HAS_ITRON_API)" = "yes"; then \ |
---|
90 | echo "#define RTEMS_ITRON_API 1" >>$@; \ |
---|
91 | fi |
---|
92 | @if test "$(RTEMS_USE_NEWLIB)" = "yes"; then \ |
---|
93 | echo "#define RTEMS_NEWLIB 1" >>$@; \ |
---|
94 | echo "#define MALLOC_PROVIDED 1" >>$@; \ |
---|
95 | fi |
---|
96 | @echo >>$@ |
---|
97 | @echo "#endif" >>$@ |
---|
98 | |
---|
99 | all: $(PREINSTALL_FILES) |
---|
100 | |
---|
101 | EXTRA_DIST = $(STD_H_FILES) $(MP_H_FILES) |
---|
102 | |
---|
103 | include $(top_srcdir)/../../../automake/local.am |
---|