Permalink
Browse files

Makefiles: No longer tolerate compiler warnings

Add -Werror to all Makefiles to turn compiler warnings into errors.

While at it, remove the -W option since it is now default.
  • Loading branch information...
1 parent 2ff45e0 commit 06c590b0ceb4b41c15f0dcf072514b221a2dcb91 @bjorng committed Jan 2, 2013
View
4 e3d/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building the E3D modules.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -52,7 +52,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -W $(TYPE_FLAGS)
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS)
# ----------------------------------------------------
# Targets
View
4 fonts_src/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for fonts.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -50,7 +50,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam) $(FONT_FILES)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -W $(TYPE_FLAGS) +debug_info '-Dwings_version="$(WINGS_VSN)"'
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info '-Dwings_version="$(WINGS_VSN)"'
# ----------------------------------------------------
# Targets
View
4 icons/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building icons for Wings 3D.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -27,7 +27,7 @@ ICONSETS= \
# FLAGS
# ----------------------------------------------------
ERL_FLAGS +=
-ERL_COMPILE_FLAGS += -W +debug_info
+ERL_COMPILE_FLAGS += -Werror +debug_info
# ----------------------------------------------------
# Targets
View
4 intl_tools/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building Wings 3D.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -34,7 +34,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# FLAGS
# ----------------------------------------------------
ERL_FLAGS +=
-ERL_COMPILE_FLAGS += -W $(TYPE_FLAGS) +debug_info
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info
# ----------------------------------------------------
# Targets
View
4 plugins_src/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building the plug-ins.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -34,7 +34,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -W $(TYPE_FLAGS) +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL)
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL)
# ----------------------------------------------------
# Targets
View
6 plugins_src/accel/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building Wings "accelerator" helpers.
#
-# Copyright (c) 2004-2011 Bjorn Gustavsson
+# Copyright (c) 2004-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -28,7 +28,7 @@ BEAM = $(LIBDIR)/wpc_pnoise.beam \
$(LIBDIR)/pnoise.beam \
$(LIBDIR)/wpc_pick.beam
-COMMON_CFLAGS = -Wall -O3
+COMMON_CFLAGS = -Wall -O3 -Werror
ifdef USEMINGWGCC
SO_EXT = dll
@@ -51,7 +51,7 @@ else
endif
ERLC = erlc
-ERLC_FLAGS = -o $(LIBDIR) +debug_info
+ERLC_FLAGS = -Werror -o $(LIBDIR) +debug_info
DRV = $(LIBDIR)/perlin_noise_drv.$(SO_EXT) \
$(LIBDIR)/wings_pick_drv.$(SO_EXT)
View
4 plugins_src/autouv/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building AutoUV.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -45,7 +45,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_SRC) -I $(WINGS_E3D) -pa $(ESDL_PATH)/ebin -W $(TYPE_FLAGS) +debug_info
+ERL_COMPILE_FLAGS += -Werror -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_SRC) -I $(WINGS_E3D) -pa $(ESDL_PATH)/ebin $(TYPE_FLAGS) +debug_info
# ----------------------------------------------------
# Targets
View
7 plugins_src/commands/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building command plug-ins.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -67,8 +67,9 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -pa $(WINGS_EBIN) -I $(WINGS_SRC) -I $(WINGS_E3D) \
- -pa $(ESDL_PATH)/ebin -I $(ESDL_PATH)/include -W $(TYPE_FLAGS) \
+ERL_COMPILE_FLAGS += -Werror -pa $(WINGS_EBIN) -I $(WINGS_SRC) \
+ -I $(WINGS_E3D) -pa $(ESDL_PATH)/ebin \
+ -I $(ESDL_PATH)/include $(TYPE_FLAGS) \
+debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL)
# ----------------------------------------------------
View
9 plugins_src/import_export/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building import/export plug-ins.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -52,9 +52,10 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_INTL) -I $(WINGS_SRC) \
- -I $(WINGS_E3D) -I $(ESDL_PATH)/include -W $(TYPE_FLAGS) -pa $(ESDL_PATH)/ebin \
- +debug_info
+ERL_COMPILE_FLAGS += -Werror \
+ -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_INTL) \
+ -I $(WINGS_SRC) -I $(WINGS_E3D) -I $(ESDL_PATH)/include \
+ $(TYPE_FLAGS) -pa $(ESDL_PATH)/ebin +debug_info
# ----------------------------------------------------
# Targets
View
4 plugins_src/jpeg/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building file JPEG image plug-in.
#
-# Copyright (c) 2004-2011 Bjorn Gustavsson
+# Copyright (c) 2004-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -29,7 +29,7 @@ LIBS = -shared
ERLC = erlc
ERLC_FLAGS = -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH)
-ERL_COMPILE_FLAGS += -W $(TYPE_FLAGS) -pa $(WINGS_INTL) -I $(WINGS_INTL) +debug_info
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) -pa $(WINGS_INTL) -I $(WINGS_INTL) +debug_info
ifdef WINDOWS
SO_EXT = dll
View
10 plugins_src/mac_file/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building file dialog plug-in for Mac.
#
-# Copyright (c) 2002-2011 Bjorn Gustavsson
+# Copyright (c) 2002-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -23,7 +23,7 @@ BEAM = $(LIBDIR)/wp8_mac_file.beam \
$(LIBDIR)/wpc_mac_misc.beam
ERLC = erlc
-ERLC_FLAGS = -W +debug_info -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_INTL)
+ERLC_FLAGS = -Werror +debug_info -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -pa $(WINGS_EBIN) -pa $(WINGS_INTL) -I $(WINGS_INTL)
DRV = $(LIBDIR)/mac_wings_file_drv.so $(LIBDIR)/mac_wings_image_drv.so
@@ -42,12 +42,14 @@ $(LIBDIR)/%.beam: %.erl
$(LIBDIR)/mac_wings_file_drv.so: mac_wings_file_drv.c
install -d $(LIBDIR)
- $(CC) -ObjC -I $(ERL_DIR)/usr/include -bundle -flat_namespace -undefined suppress \
+ $(CC) -Werror -ObjC -I $(ERL_DIR)/usr/include \
+ -bundle -flat_namespace -undefined suppress \
-framework Cocoa -o $(LIBDIR)/mac_wings_file_drv.so $(UNIVERSAL_FLAGS) \
mac_wings_file_drv.c
$(LIBDIR)/mac_wings_image_drv.so: mac_wings_image_drv.m
install -d $(LIBDIR)
- $(CC) -I $(ERL_DIR)/usr/include -bundle -flat_namespace -undefined suppress \
+ $(CC) -Werror -I $(ERL_DIR)/usr/include \
+ -bundle -flat_namespace -undefined suppress \
-framework Cocoa -o $(LIBDIR)/mac_wings_image_drv.so $(UNIVERSAL_FLAGS) \
mac_wings_image_drv.m
View
6 plugins_src/primitives/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building plug-ins for primitives.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -45,8 +45,8 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -I $(WINGS_SRC) -I $(WINGS_E3D) -pa $(ESDL)/ebin \
- -W $(TYPE_FLAGS) -pa $(WINGS_INTL) -I $(WINGS_INTL) +debug_info
+ERL_COMPILE_FLAGS += -Werror -I $(WINGS_SRC) -I $(WINGS_E3D) -pa $(ESDL)/ebin \
+ $(TYPE_FLAGS) -pa $(WINGS_INTL) -I $(WINGS_INTL) +debug_info
# ----------------------------------------------------
# Targets
View
3 plugins_src/qt_file/Makefile
@@ -32,7 +32,8 @@ DLLS = $(LIBDIR)/qt_wings_file_drv.so
BEAM = $(LIBDIR)/wp8_qt_file.beam
ERLC = erlc
-ERLC_FLAGS = -o $(LIBDIR)
+ERLC_FLAGS = -Werror -o $(LIBDIR)
+
#
# Targets
#
View
4 plugins_src/win32_file/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building file dialog plug-in for Windows.
#
-# Copyright (c) 2003-2011 Bjorn Gustavsson
+# Copyright (c) 2003-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -20,7 +20,7 @@ BEAM = $(LIBDIR)/wp8_file.beam
LIBS = -shared -lcomdlg32
ERLC = erlc
-ERLC_FLAGS = -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -W +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL)
+ERLC_FLAGS = -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -Werror +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL)
DRV = $(LIBDIR)/wings_file_drv.dll
View
4 plugins_src/wx_file/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building file dialog plug-in for Windows.
#
-# Copyright (c) 2003-2011 Bjorn Gustavsson
+# Copyright (c) 2003-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,7 +17,7 @@ LIBDIR = ../../plugins/win32_file
BEAM = $(LIBDIR)/wp8_file.beam
ERLC = erlc
-ERLC_FLAGS = -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -W +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL) -DUSE_WX
+ERLC_FLAGS = -o $(LIBDIR) -I ../../e3d -I ../../src -I $(ESDL_PATH)/include -pa $(ESDL_PATH) -Werror +debug_info -pa $(WINGS_INTL) -I $(WINGS_INTL) -DUSE_WX
opt: $(BEAM)
View
6 src/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for building Wings 3D.
#
-# Copyright (c) 2001-2011 Bjorn Gustavsson
+# Copyright (c) 2001-2013 Bjorn Gustavsson
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -134,8 +134,8 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -pa $(ESDL_PATH)/ebin -I $(ESDL_PATH)/include \
- -I ../e3d -W $(TYPE_FLAGS) '-Dwings_version="$(WINGS_VSN)"' -pa $(WINGS_INTL) $(USE_WX)
+ERL_COMPILE_FLAGS += -Werror -pa $(ESDL_PATH)/ebin -I $(ESDL_PATH)/include \
+ -I ../e3d $(TYPE_FLAGS) '-Dwings_version="$(WINGS_VSN)"' -pa $(WINGS_INTL) $(USE_WX)
# ----------------------------------------------------
# Targets

0 comments on commit 06c590b

Please sign in to comment.