source: rtems/testsuites/automake/compile.am @ 73f5388

4.104.114.84.95
Last change on this file since 73f5388 was 73f5388, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/06/05 at 11:31:43

2004-01-06 Ralf Corsepius <ralf.corsepius@…>

  • automake/compile.am: Remove CONFIG.CC (Unused). Remove CPPFLAGS, CFLAGS, CXXFLAGS, ASFLAGS (Implicitly handled by automake). Add CCAS. Use AM_*FLAGS = RTEMS_*FLAGS. Remove LIB_VARIANT from LINK_*. Cleanup comments.
  • Property mode set to 100644
File size: 3.0 KB
Line 
1##
2## $Id$
3##
4
5## -------------------------------------------------------------------------
6## NOTE: This file is rather immature and has to be considered to be
7## almost experimental.
8##
9## Expect frequent changes -- It deserves to be cleaned up :(
10## -------------------------------------------------------------------------
11
12if RTEMS_USE_GCC
13## All the stuff below is specific to gcc
14GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS)
15endif # RTEMS_USE_GCC
16
17DEFS = @DEFS@
18
19LINK_LIBS = $(LD_LIBS)
20
21#
22# How to compile stuff into ${ARCH} subdirectory
23#
24
25COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
26        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
27CCLD = $(CC)
28LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
29        $(AM_LDFLAGS) $(LDFLAGS) -o $@
30
31CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
32        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
33CXXLD = $(CXX)
34CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
35        $(AM_LDFLAGS) $(LDFLAGS) -o $@
36
37CCAS = $(CC)
38CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
39
40${ARCH}/%.o: %.c $(ARCH)/$(dirstamp)
41        ${COMPILE} -o $@ -c $<
42
43${ARCH}/%.o: %.cc $(ARCH)/$(dirstamp)
44        ${CXXCOMPILE} -o $@ -c $<
45
46${ARCH}/%.o: %.S $(ARCH)/$(dirstamp)
47        ${CCASCOMPILE} -DASM -o $@ -c $<
48
49${ARCH}/$(dirstamp):
50        @$(mkdir_p) $(ARCH)
51        @: > $(ARCH)/$(dirstamp)
52
53# Dependency files for use by gmake
54# NOTE: we don't put them into $(ARCH)
55#       so that 'make clean' doesn't blow it away
56
57DEPEND=Depends-${ARCH}
58
59# We deliberately don't have anything depend on the
60# $(DEPEND) file; otherwise it will get rebuilt even
61# on 'make clean'
62#
63
64if RTEMS_USE_GCC
65## HACK: Specific to gcc
66## FIXME: The approach below is known to be conceptionally broken.
67depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES)
68##       Use gcc -M to generate dependencies
69##       Replace foo.o with $(ARCH)/foo.o
70##       Replace $(ARCH) value with string $(ARCH)
71##           so that it will for debug cases
72        $(COMPILE) -M   $^    |  \
73        sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
74            -e 's?$(ARCH)/?$$(ARCH)/?'   >$(DEPEND).tmp
75        mv $(DEPEND).tmp $(DEPEND)
76
77# pull in dependencies if they exist
78ifeq (${DEPEND},$(wildcard ${DEPEND}))
79include ${DEPEND}
80@ENDIF@
81endif
82depend: depend-am
83
84# spell out all the LINK_FILE's, rather than using -lbsp, so
85#  that $(LINK_FILES) can be a dependency
86
87LINK_OBJS = \
88    $(OBJS) \
89    $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
90
91LINK_FILES =\
92    $(START_FILE) \
93    $(OBJS) \
94    $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
95
96## -------------------------------------------------------------------------
97## Setup the variant build subdirectory
98ARCH = o-optimize
99
100## -------------------------------------------------------------------------
101CC = @CC@ $(GCCSPECS)
102CXX = @CXX@ $(GCCSPECS)
103CPP = @CPP@ $(GCCSPECS)
104CCAS = @CCAS@ $(GCCSPECS)
105
106LD = @LD@
107OBJCOPY = @OBJCOPY@
108NM = @NM@
109SIZE = @SIZE@
110STRIP = @STRIP@
111
112##
113AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
114AM_CFLAGS = $(RTEMS_CFLAGS)
115AM_CXXFLAGS = $(RTEMS_CXXFLAGS)
116AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
117
118clean-local:
119        $(RM) -r o-optimize $(CLEANDIRS)
120        $(RM) Depends-o-optimize.tmp
Note: See TracBrowser for help on using the repository browser.