summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-28 12:06:09 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-28 12:06:09 -0800
commit8f7fb0a019ebf8e40302bff892baf39955c594b1 (patch)
tree6c10208b541cdf4183e2020cb7d8ef250b33e528
parent0e7eec82341e06cd42f2084f776d8377cbcf0871 (diff)
downloadtxr-8f7fb0a019ebf8e40302bff892baf39955c594b1.tar.gz
txr-8f7fb0a019ebf8e40302bff892baf39955c594b1.tar.bz2
txr-8f7fb0a019ebf8e40302bff892baf39955c594b1.zip
* Makefile (CFLAGS): If the compiler matches the pattern %g++,
then remove some C-front-end-specific warnings from CFLAGS, which the g++ front end will complain about.
-rw-r--r--ChangeLog6
-rw-r--r--Makefile4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eb7edc5..efa92361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
+ * Makefile (CFLAGS): If the compiler matches the pattern %g++,
+ then remove some C-front-end-specific warnings from CFLAGS,
+ which the g++ front end will complain about.
+
+2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
+
* Makefile (CFLAGS): add -Dlint to CFLAGS when compiling y.tab.o.
This suppresses some warnings from a byacc-generated parser,
and gets rid of a useless static sccsid array. May help with
diff --git a/Makefile b/Makefile
index e7043276..58cf57a3 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,10 @@ CFLAGS := -I. -I$(top_srcdir) $(LANG_FLAGS) $(DIAG_FLAGS) \
$(OPT_FLAGS) $(DBG_FLAGS) $(PLATFORM_FLAGS)
CFLAGS := $(filter-out $(REMOVE_FLAGS),$(CFLAGS))
+ifeq ($(patsubst %g++,y,$(CC)),y)
+CFLAGS := $(filter-out -Wmissing-prototypes -Wstrict-prototypes,$(CFLAGS))
+endif
+
OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o
OBJS += hash.o utf8.o