Changeset 11cafc0 in rtems for c/src/automake/compile.am


Ignore:
Timestamp:
Feb 12, 2004, 12:10:29 PM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
e9e6b77
Parents:
c24d7c84
Message:

2004-02-12 Ralf Corsepius <corsepiu@…>

  • wrapup/Makefile.am: Don't include lib.am.
  • automake/compile.am: Use automake compilation rules.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/automake/compile.am

    rc24d7c84 r11cafc0  
    3737## 'VARIANT=<OPTIMIZE|DEBUG>' targets to their _V values.
    3838
    39 ## XCPPFLAGS, XCFLAGS, XCXXFLAGS, XASFLAGS
    40 ## are used to add flags from the shell
    41 ## cf. make.info ("Implicit rules/variables" for details)
    42 
    4339if RTEMS_USE_GCC
    4440## All the stuff below is specific to gcc
     
    5450DEFS = @DEFS@
    5551
    56 CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS)
    57 CFLAGS   = @RTEMS_CFLAGS@ $(XCFLAGS)
     52CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES)
     53CFLAGS   = @RTEMS_CFLAGS@
    5854## FIXME: This should be correct, but is not supported, yet
    5955# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS)
     
    6258ASFLAGS  = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS)
    6359
    64 #
    65 # Client compiler and support tools
    66 #
    67 
    68 #
    69 # How to compile stuff into ${ARCH} subdirectory
    70 #
    71 
    72 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    73         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    74 CCLD = $(CC)
    75 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
    76         $(AM_LDFLAGS) $(LDFLAGS) -o $@
    77 
    78 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    79         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
    80 CXXLD = $(CXX)
    81 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
    82         $(AM_LDFLAGS) $(LDFLAGS) -o $@
    83 
    84 CCAS = $(CC)
    85 CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
    86 
    87 # OBSOLETE: Don't use
    88 AS = $(CC)
    89 ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS)
    90 
    91 ${ARCH}/%.o: %.c $(ARCH)/$(dirstamp)
    92         ${COMPILE} -o $@ -c $<
    93 
    94 ${ARCH}/%.o: %.cc $(ARCH)/$(dirstamp)
    95         ${CXXCOMPILE} -o $@ -c $<
    96 
    97 ${ARCH}/%.o: %.S $(ARCH)/$(dirstamp)
    98         ${CCASCOMPILE} -DASM -o $@ -c $<
    99 
    100 ${ARCH}/$(dirstamp):
    101         @$(mkdir_p) $(ARCH)
    102         @: > $(ARCH)/$(dirstamp)
    103 
    104 # Dependency files for use by gmake
    105 # NOTE: we don't put them into $(ARCH)
    106 #       so that 'make clean' doesn't blow it away
    107 
    108 DEPEND=Depends-${ARCH}
    109 
    110 # We deliberately don't have anything depend on the
    111 # $(DEPEND) file; otherwise it will get rebuilt even
    112 # on 'make clean'
    113 #
    114 
    115 if RTEMS_USE_GCC
    116 ## HACK: Specific to gcc
    117 ## FIXME: The approach below is known to be conceptionally broken.
    118 depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES)
    119 ##       Use gcc -M to generate dependencies
    120 ##       Replace foo.o with $(ARCH)/foo.o
    121 ##       Replace $(ARCH) value with string $(ARCH)
    122 ##           so that it will for debug cases
    123         $(COMPILE) -M   $^    |  \
    124         sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
    125             -e 's?$(ARCH)/?$$(ARCH)/?'   >$(DEPEND).tmp
    126         mv $(DEPEND).tmp $(DEPEND)
    127 
    128 # pull in dependencies if they exist 
    129 ifeq (${DEPEND},$(wildcard ${DEPEND}))
    130 include ${DEPEND}
    131 @ENDIF@
    132 endif
    133 depend: depend-am
     60depend:
    13461
    13562if RTEMS_USE_GCC
     
    15784
    15885VARIANT_V = $(VARIANT_$(VARIANT)_V)
    159 
    160 ## Setup the variant build subdirectory
    161 ARCH_OPTIMIZE_V = o-optimize
    162 ARCH_DEBUG_V = o-debug
    163 
    164 ARCH__V = $(ARCH_OPTIMIZE_V)
    165 ARCH = $(ARCH_$(VARIANT_V)_V)
    16686
    16787## Setup the library suffix
     
    207127AM_CFLAGS =
    208128AM_CXXFLAGS =
    209 AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
    210 
    211 clean-local:
    212         $(RM) -r o-optimize o-debug $(CLEANDIRS)
    213         $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp
     129AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
Note: See TracChangeset for help on using the changeset viewer.