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