1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | AUTOMAKE_OPTIONS = foreign 1.4 |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
8 | |
---|
9 | TARGOPTS = targopts.h |
---|
10 | |
---|
11 | H_FILES = $(TARGOPTS) |
---|
12 | |
---|
13 | PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ |
---|
14 | $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) |
---|
15 | |
---|
16 | $(PROJECT_INCLUDE)/rtems/score: |
---|
17 | @$(mkinstalldirs) $@ |
---|
18 | |
---|
19 | $(PROJECT_INCLUDE)/rtems/score/%.h: %.h |
---|
20 | $(INSTALL_DATA) $< $@ |
---|
21 | |
---|
22 | CLEANFILES += $(TARGOPTS) |
---|
23 | |
---|
24 | # Until RTEMS_CPU is removed from all the make configuration files, |
---|
25 | # this will need to be here to transform hppa1.1 into hppa1_1 to |
---|
26 | # make it a valid cpp symbol. At some point in the near future, |
---|
27 | # targopts.h should not define RTEMS_CPU. As best I can tell, |
---|
28 | # gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL |
---|
29 | # on some families but not on others. For example, the i386 |
---|
30 | # family does not give us enough information from the predefines. |
---|
31 | RTEMS_CPU_DEFINED = $(subst .,_,$(RTEMS_CPU)) |
---|
32 | |
---|
33 | # make the target dependent options file |
---|
34 | $(TARGOPTS): Makefile.in |
---|
35 | @echo "/* target board dependent options file */" >$@ |
---|
36 | @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@ |
---|
37 | @echo >>$@ |
---|
38 | @echo "#ifndef __TARGET_OPTIONS_h" >>$@ |
---|
39 | @echo "#define __TARGET_OPTIONS_h" >>$@ |
---|
40 | @echo >>$@ |
---|
41 | @echo "#include <rtems/score/cpuopts.h>" >>$@ |
---|
42 | @echo >>$@ |
---|
43 | @echo "#ifdef $(RTEMS_CPU_DEFINED)" >>$@ |
---|
44 | @echo "#undef $(RTEMS_CPU_DEFINED)" >>$@ |
---|
45 | @echo "#endif" >>$@ |
---|
46 | @echo "#define $(RTEMS_CPU_DEFINED) 1" >>$@ |
---|
47 | @echo >>$@ |
---|
48 | @echo "#ifdef $(RTEMS_CPU_MODEL)" >>$@ |
---|
49 | @echo "#undef $(RTEMS_CPU_MODEL)" >>$@ |
---|
50 | @echo "#endif" >>$@ |
---|
51 | @echo "#define $(RTEMS_CPU_MODEL) 1" >>$@ |
---|
52 | @echo >>$@ |
---|
53 | @echo "#ifdef @RTEMS_BSP@" >>$@ |
---|
54 | @echo "#undef @RTEMS_BSP@" >>$@ |
---|
55 | @echo "#endif" >>$@ |
---|
56 | @echo "#define @RTEMS_BSP@ 1" >>$@ |
---|
57 | @echo >>$@ |
---|
58 | @$(make-target-options) |
---|
59 | @echo >>$@ |
---|
60 | @echo "#endif" >>$@ |
---|
61 | |
---|
62 | all-local: $(PREINSTALL_FILES) |
---|
63 | |
---|
64 | include $(top_srcdir)/../../../../automake/local.am |
---|