]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/gcc.omk
Move cmetric rules to a separate snippet
[omk.git] / snippets / gcc.omk
index dc24bc13ba194d25145552c1f59761b0367162c1..142fdb8a72b7dc939b96abb82722c6f12e54e51a 100644 (file)
@@ -30,8 +30,6 @@
 # COMPILE_c_o_template, COMPILE_cc_o_template, COMPILE_S_o_template -
 # templates that create rules for compilation of sources
 
-# CMETRIC_o_h_template - FIXME
-
 # PROGRAM_template, LIBRARY_template, SOLIB_template - templates that
 # create rules for compilation of a program, library and shared
 # library. The rules can use rules produced by COMPILE_xxx_template.
@@ -70,7 +68,7 @@ c_o_COMPILE = $$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $$(CFLAGS)
 
 cc_o_COMPILE = $$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $$(CFLAGS)
+       $(CPPFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $$(CFLAGS)
 
 S_o_COMPILE = $$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(CPPFLAGS) $(AM_CFLAGS) $$(CFLAGS) $(ASFLAGS)
@@ -122,31 +120,6 @@ $(2): $(1) $$(GEN_HEADERS)
        fi
 endef
 
-# Syntax: $(call CMETRIC_o_h_template,<object_file>,<target_header>)
-define CMETRIC_o_h_template
-$(2): $(1)
-       @$(QUIET_CMD_ECHO) "  CMETRIC $$@"
-       $(Q)if [ -n `dirname $$@` ] ; then \
-             if [ ! -e `dirname $$@` ] ; then \
-               mkdir -p `dirname $$@` ; fi ; fi
-       $(Q)echo >$$@.tmp '/* Automatically generated from $$< */'
-       $(Q)echo >>$$@.tmp '/* Conditionals to control compilation */'
-# Bellow, the tricks with redirection are for shells without set -o pipefail
-# (see http://www.mail-archive.com/dash@vger.kernel.org/msg00149.html)
-       $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
-               | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2cond_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
-               | sort >>$$@.tmp` && exit $$$$status
-       $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in hexadecimal format */'
-       $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
-               | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2def_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
-               | sort >>$$@.tmp` && exit $$$$status
-       $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in decimal format */'
-       $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) -td $$<; echo $$$$? >&4; }\
-               | $(SED4OMK) -n 's/^ *0*\(0\|[1-9][0-9]*\) *A *_cmetric2defdec_\([A-Za-z_0-9]*\) */#define \2 \1/p' \
-               | sort >>$$@.tmp` && exit $$$$status
-       $(Q)mv $$@.tmp $$@
-endef
-
 # Syntax: $(call PROGRAM_template,<executable-name>,<dir>,<link-variant>)
 define PROGRAM_template