summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/include/rtems/score/Makefile.in
blob: afd1f9898be31a42988ed55925c8c426baff0770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
#  $Id$
#

@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../../../../../..
subdir = c/src/exec/score/include/rtems/score

INSTALL = @INSTALL@

RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@
PROJECT_ROOT = @PROJECT_ROOT@

VPATH = @srcdir@

# We only build multiprocessing related files if HAS_MP was defined
MP_PIECES_yes_V = mpci mppkt objectmp threadmp 
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)

# H_FILES that get installed in the rtems/score subdirectoy
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
    coresem heap interr isr object \
    priority stack states sysstate thread threadq \
    tod tqdata userext watchdog wkspace

# Use this if compilation in location will be supported
# H_FILES=$(H_PIECES:%=$(srcdir)/%.h) targopts.h

# FIXME: Work-around
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
TARGOPTS=$(PROJECT_INCLUDE)/rtems/score/targopts.h

SRCS=$(H_FILES) $(TARGOPTS)

include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg
include $(RTEMS_ROOT)/make/leaf.cfg

#
# Add your list of files to delete here.  The config files
#  already know how to delete some stuff, so you may want
#  to just run 'make clean' first to see what gets missed.
#  'make clobber' already includes 'make clean'
#

CLEAN_ADDITIONS += $(TARGOPTS)
CLOBBER_ADDITIONS +=

# Until RTEMS_CPU is removed from all the make configuration files,
# this will need to be here to transform hppa1.1 into hppa1_1 to
# make it a valid cpp symbol.  At some point in the near future,
# targopts.h should not define RTEMS_CPU.  As best I can tell,
# gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL
# on some families but not on others.  For example, the i386
# family does not give us enough information from the predefines.
RTEMS_CPU_DEFINED=$(subst .,_,$(RTEMS_CPU))

# make the target dependent options file
$(TARGOPTS):
	@echo "/* target board dependent options file */"       >$@
	@echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
	@echo                                                  >>$@
	@echo "#ifndef __TARGET_OPTIONS_h"                     >>$@
	@echo "#define __TARGET_OPTIONS_h"                     >>$@
	@echo                                                  >>$@
	@echo "#ifdef $(RTEMS_CPU_DEFINED)"                    >>$@
	@echo "#undef $(RTEMS_CPU_DEFINED)"                    >>$@
	@echo "#endif"                                         >>$@
	@echo "#define $(RTEMS_CPU_DEFINED) 1"                 >>$@
	@echo                                                  >>$@
	@echo "#ifdef $(RTEMS_CPU_MODEL)"                      >>$@
	@echo "#undef $(RTEMS_CPU_MODEL)"                      >>$@
	@echo "#endif"                                         >>$@
	@echo "#define $(RTEMS_CPU_MODEL) 1"                   >>$@
	@echo                                                  >>$@
	@echo "#ifdef ${RTEMS_BSP}"                            >>$@
	@echo "#undef ${RTEMS_BSP}"                            >>$@
	@echo "#endif"                                         >>$@
	@echo "#define ${RTEMS_BSP} 1"                         >>$@
	@echo                                                  >>$@
	@$(make-target-options)
ifeq (${RTEMS_USE_MACROS},yes)
	@echo "#define USE_MACROS 1"                           >>$@
else
	@echo "#define USE_INLINES 1"                          >>$@
endif
ifeq ($(HAS_MULTIPROCESSING),yes)
	@echo "#define RTEMS_MULTIPROCESSING 1"                >>$@
endif
ifeq ($(HAS_POSIX_API),yes)
	@echo "#define RTEMS_POSIX_API 1"                      >>$@
endif
ifeq ($(RTEMS_USE_NEWLIB),yes)
	@echo "#define RTEMS_NEWLIB 1"                         >>$@
	@echo "#define MALLOC_PROVIDED 1"                      >>$@
endif
	@echo                                                  >>$@
	@echo "#endif"                                         >>$@
	@chmod 755 $@

all:	$(SRCS)
	$(INSTALL_DATA) ${H_FILES} $(PROJECT_INCLUDE)/rtems/score

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	cd $(top_builddir) \
	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status