Permalink
Browse files

[GH #844] Improve makefile rules

Add clang suffix overrides or dynoplibs (-Wno-parentheses-equality)
Improve the DYNOPLIBS defines.
  • Loading branch information...
1 parent df26e9a commit e6c9077e612449502768ff5111cf9491696f4155 Reini Urban committed Sep 26, 2012
Showing with 26 additions and 8 deletions.
  1. +0 −1 config/gen/makefiles.pm
  2. +11 −7 src/dynoplibs/Defines.in
  3. +15 −0 src/dynoplibs/Rules.in
View
@@ -38,7 +38,6 @@ sub _init {
'src/dynoplibs/Defines.mak' => {
SOURCE => 'src/dynoplibs/Defines.in',
},
-
'src/dynpmc/Rules.mak' => {
SOURCE => 'src/dynpmc/Rules.in',
},
View
@@ -1,18 +1,22 @@
+# Copyright (C) 2010-2012, Parrot Foundation.
+
DYNOPLIBS_TARGETS = \
$(DYNEXT_DIR)/obscure_ops$(LOAD_EXT) \
$(DYNEXT_DIR)/math_ops$(LOAD_EXT) \
$(DYNEXT_DIR)/trans_ops$(LOAD_EXT) \
$(DYNEXT_DIR)/bit_ops$(LOAD_EXT) \
$(DYNEXT_DIR)/debug_ops$(LOAD_EXT) \
$(DYNEXT_DIR)/sys_ops$(LOAD_EXT) \
- $(DYNEXT_DIR)/io_ops$(LOAD_EXT) \
+ $(DYNEXT_DIR)/io_ops$(LOAD_EXT)
DYNOPLIBS_CLEANUPS = \
+ $(DYNOPLIBS_TARGETS) \
src/dynoplibs/*.c \
src/dynoplibs/*.h \
- src/dynoplibs/*.lib \
- src/dynoplibs/*.pdb \
- src/dynoplibs/*.ilk \
- src/dynoplibs/*.def \
- src/dynoplibs/*.manifest \
- src/dynoplibs/*$(O) \
+#IF(win32): src/dynoplibs/*.lib \
+#IF(win32): src/dynoplibs/*.pdb \
+#IF(win32): src/dynoplibs/*.ilk \
+#IF(win32): src/dynoplibs/*.def \
+#IF(win32): src/dynoplibs/*.manifest \
+#IF(o): src/dynoplibs/*$(O)
+
View
@@ -16,8 +16,11 @@ $(DYNEXT_DIR)/obscure_ops$(LOAD_EXT): src/dynoplibs/obscure_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/obscure_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/obscure_ops.c src/dynoplibs/obscure_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/obscure_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/obscure_ops.c
+
src/dynoplibs/obscure_ops.h: src/dynoplibs/obscure_ops.c
@@ -36,8 +39,10 @@ $(DYNEXT_DIR)/math_ops$(LOAD_EXT): src/dynoplibs/math_ops$(O) $(LIBPARROT)
src/dynoplibs/math_ops.c: src/dynoplibs/math.ops $(OPS2C)
$(OPS2C) --dynamic src/dynoplibs/math.ops --quiet
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/math_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/math_ops.c src/dynoplibs/math_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/math_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/math_ops.c
src/dynoplibs/math_ops.h: src/dynoplibs/math_ops.c
@@ -50,8 +55,10 @@ $(DYNEXT_DIR)/trans_ops$(LOAD_EXT): src/dynoplibs/trans_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/trans_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/trans_ops.c src/dynoplibs/trans_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/trans_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/trans_ops.c
src/dynoplibs/trans_ops.h: src/dynoplibs/trans_ops.c
@@ -67,8 +74,10 @@ $(DYNEXT_DIR)/bit_ops$(LOAD_EXT): src/dynoplibs/bit_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/bit_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/bit_ops.c src/dynoplibs/bit_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/bit_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/bit_ops.c
src/dynoplibs/bit_ops.h: src/dynoplibs/bit_ops.c
@@ -84,8 +93,10 @@ $(DYNEXT_DIR)/debug_ops$(LOAD_EXT): src/dynoplibs/debug_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/debug_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/debug_ops.c src/dynoplibs/debug_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/debug_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/debug_ops.c
src/dynoplibs/debug_ops.h: src/dynoplibs/debug_ops.c
@@ -101,8 +112,10 @@ $(DYNEXT_DIR)/sys_ops$(LOAD_EXT): src/dynoplibs/sys_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/sys_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/sys_ops.c src/dynoplibs/sys_ops.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/sys_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/sys_ops.c
src/dynoplibs/sys_ops.h: src/dynoplibs/sys_ops.c
@@ -118,8 +131,10 @@ $(DYNEXT_DIR)/io_ops$(LOAD_EXT): src/dynoplibs/io_ops$(O) $(LIBPARROT)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/io_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/io_ops.c src/dynoplibs/io_ops.h src/io/io_private.h
+ $(CC) $(CFLAGS) @optimize::src/dynoplibs/io_ops.c@ @ccwarn::src/ops/core_ops.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/dynoplibs/io_ops.c
src/dynoplibs/io_ops.h: src/dynoplibs/io_ops.c

0 comments on commit e6c9077

Please sign in to comment.