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