source: rtems/testsuites/automake/compile.am @ 0961040

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

Remove duplicate CCAS.

  • 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
37CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
38
39${ARCH}/%.o: %.c $(ARCH)/$(dirstamp)
40        ${COMPILE} -o $@ -c $<
41
42${ARCH}/%.o: %.cc $(ARCH)/$(dirstamp)
43        ${CXXCOMPILE} -o $@ -c $<
44
45${ARCH}/%.o: %.S $(ARCH)/$(dirstamp)
46        ${CCASCOMPILE} -DASM -o $@ -c $<
47
48${ARCH}/$(dirstamp):
49        @$(mkdir_p) $(ARCH)
50        @: > $(ARCH)/$(dirstamp)
51
52# Dependency files for use by gmake
53# NOTE: we don't put them into $(ARCH)
54#       so that 'make clean' doesn't blow it away
55
56DEPEND=Depends-${ARCH}
57
58# We deliberately don't have anything depend on the
59# $(DEPEND) file; otherwise it will get rebuilt even
60# on 'make clean'
61#
62
63if RTEMS_USE_GCC
64## HACK: Specific to gcc
65## FIXME: The approach below is known to be conceptionally broken.
66depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES)
67##       Use gcc -M to generate dependencies
68##       Replace foo.o with $(ARCH)/foo.o
69##       Replace $(ARCH) value with string $(ARCH)
70##           so that it will for debug cases
71        $(COMPILE) -M   $^    |  \
72        sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
73            -e 's?$(ARCH)/?$$(ARCH)/?'   >$(DEPEND).tmp
74        mv $(DEPEND).tmp $(DEPEND)
75
76# pull in dependencies if they exist
77ifeq (${DEPEND},$(wildcard ${DEPEND}))
78include ${DEPEND}
79@ENDIF@
80endif
81depend: depend-am
82
83# spell out all the LINK_FILE's, rather than using -lbsp, so
84#  that $(LINK_FILES) can be a dependency
85
86LINK_OBJS = \
87    $(OBJS) \
88    $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
89
90LINK_FILES =\
91    $(START_FILE) \
92    $(OBJS) \
93    $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
94
95## -------------------------------------------------------------------------
96## Setup the variant build subdirectory
97ARCH = o-optimize
98
99## -------------------------------------------------------------------------
100CC = @CC@ $(GCCSPECS)
101CXX = @CXX@ $(GCCSPECS)
102CPP = @CPP@ $(GCCSPECS)
103CCAS = @CCAS@ $(GCCSPECS)
104
105LD = @LD@
106OBJCOPY = @OBJCOPY@
107NM = @NM@
108SIZE = @SIZE@
109STRIP = @STRIP@
110
111##
112AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
113AM_CFLAGS = $(RTEMS_CFLAGS)
114AM_CXXFLAGS = $(RTEMS_CXXFLAGS)
115AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
116
117clean-local:
118        $(RM) -r o-optimize $(CLEANDIRS)
119        $(RM) Depends-o-optimize.tmp
Note: See TracBrowser for help on using the repository browser.