From f7916866e3e4a81a2ba69d75b04ee6c45673429e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 4 Jan 2014 17:07:11 +0000 Subject: remove all references to using libMNG --- atari/Makefile.target | 1 - 1 file changed, 1 deletion(-) (limited to 'atari/Makefile.target') diff --git a/atari/Makefile.target b/atari/Makefile.target index 283361355..bc79b0625 100644 --- a/atari/Makefile.target +++ b/atari/Makefile.target @@ -35,7 +35,6 @@ endif FREETYPE_FONT_CFLAGS := $(shell freetype-config --cflags) -DWITH_FREETYPE_FONT_DRIVER SPIDERMONKEY_CFLAGS := -DWITH_MOZJS -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE -$(eval $(call feature_enabled,MNG,-DWITH_MNG,-lmng,PNG/MNG/JNG (libmng))) $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng))) $(eval $(call feature_enabled,MOZJS,$(SPIDERMONKEY_CFLAGS),-ljs,JavaScript (Spidermonkey))) $(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype))) -- cgit v1.2.3 From 8e1fe5d1a9501e7a9b50be41994ed3e92b9cc6ae Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 19 Jan 2014 22:51:28 +0000 Subject: Atari: run correct freetype-config --- atari/Makefile.target | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'atari/Makefile.target') diff --git a/atari/Makefile.target b/atari/Makefile.target index bc79b0625..60f6e8056 100644 --- a/atari/Makefile.target +++ b/atari/Makefile.target @@ -10,6 +10,7 @@ # the netsurf environment! STRIP := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*strip) STACK := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*stack) +FT2CF := $(GCCSDK_INSTALL_ENV)/bin/freetype-config ifeq ($(ATARIARCH),68000) PRGSUFFIX := 000.app @@ -32,7 +33,7 @@ endif # non-pkgconfig components -FREETYPE_FONT_CFLAGS := $(shell freetype-config --cflags) -DWITH_FREETYPE_FONT_DRIVER +FREETYPE_FONT_CFLAGS := $(shell $(FT2CF) --cflags) -DWITH_FREETYPE_FONT_DRIVER SPIDERMONKEY_CFLAGS := -DWITH_MOZJS -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng))) -- cgit v1.2.3 From 56b42943d0ad0d032b2219290a2b7a02fa598466 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Apr 2014 11:56:05 +0100 Subject: improve iconv library handling --- Makefile | 39 ++++++++++++++++++++++++++++++++++++--- atari/Makefile.target | 2 +- beos/Makefile.target | 2 +- cocoa/Makefile.target | 2 +- gtk/Makefile.defaults | 6 ++++++ windows/Makefile.target | 3 +-- 6 files changed, 46 insertions(+), 8 deletions(-) (limited to 'atari/Makefile.target') diff --git a/Makefile b/Makefile index 4f9380a8b..864c5bd32 100644 --- a/Makefile +++ b/Makefile @@ -314,6 +314,8 @@ DEPROOT := $(OBJROOT)/deps TOOLROOT := $(OBJROOT)/tools +# A macro that conditionaly adds flags to the build when a feature is enabled. +# # 1: Feature name (ie, NETSURF_USE_BMP -> BMP) # 2: Parameters to add to CFLAGS # 3: Parameters to add to LDFLAGS @@ -335,6 +337,33 @@ define feature_enabled endif endef +# A macro that conditionaly adds flags to the build with a uniform display. +# +# 1: Feature name (ie, NETSURF_USE_BMP -> BMP) +# 2: Human-readable name for the feature +# 3: Parameters to add to CFLAGS when enabled +# 4: Parameters to add to LDFLAGS when enabled +# 5: Parameters to add to CFLAGS when disabled +# 6: Parameters to add to LDFLAGS when disabled +define feature_switch + ifeq ($$(NETSURF_USE_$(1)),YES) + CFLAGS += $(3) + LDFLAGS += $(4) + ifneq ($(MAKECMDGOALS),clean) + $$(info M.CONFIG: $(2) enabled (NETSURF_USE_$(1) := YES)) + endif + else ifeq ($$(NETSURF_USE_$(1)),NO) + CFLAGS += $(5) + LDFLAGS += $(6) + ifneq ($(MAKECMDGOALS),clean) + $$(info M.CONFIG: $(2) disabled (NETSURF_USE_$(1) := NO)) + endif + else + $$(info M.CONFIG: $(4) error (NETSURF_USE_$(1) := $$(NETSURF_USE_$(1)))) + $$(error NETSURF_USE_$(1) must be YES or NO) + endif +endef + # Extend flags with appropriate values from pkg-config for enabled features # # 1: pkg-config required modules for feature @@ -431,10 +460,14 @@ endif # Pull in the configuration include Makefile.defaults -$(eval $(call feature_enabled,JPEG,-DWITH_JPEG,-ljpeg,JPEG (libjpeg))) +# Build flags for libjpeg as it has no pkgconfig file +$(eval $(call feature_switch,JPEG,JPEG (libjpeg),-DWITH_JPEG,-ljpeg,-UWITH_JPEG,)) + +# Build flags for haru +$(eval $(call feature_switch,HARU_PDF,PDF export (haru),-DWITH_PDF_EXPORT,-lhpdf -lpng,-UWITH_PDF_EXPORT,)) -$(eval $(call feature_enabled,HARU_PDF,-DWITH_PDF_EXPORT,-lhpdf -lpng,PDF export (haru))) -$(eval $(call feature_enabled,LIBICONV_PLUG,-DLIBICONV_PLUG,,glibc internal iconv)) +# Build flags for iconv +$(eval $(call feature_switch,LIBICONV_PLUG,glibc internal iconv,-DLIBICONV_PLUG,,-ULIBICONV_PLUG,-liconv)) # common libraries without pkg-config support LDFLAGS += -lz diff --git a/atari/Makefile.target b/atari/Makefile.target index 60f6e8056..685140099 100644 --- a/atari/Makefile.target +++ b/atari/Makefile.target @@ -69,7 +69,7 @@ CFLAGS += -U__STRICT_ANSI__ -std=c99 -Dsmall $(WARNFLAGS) -Dnsatari \ LDFLAGS += -lcflib -lcurl LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub LDFLAGS += -lssl -lcrypto -LDFLAGS += -lz -liconv -lcares -lHermes -lgem -lm +LDFLAGS += -lz -lcares -lHermes -lgem -lm LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib diff --git a/beos/Makefile.target b/beos/Makefile.target index ed7532dc2..a1259d644 100644 --- a/beos/Makefile.target +++ b/beos/Makefile.target @@ -12,7 +12,7 @@ LDFLAGS += -L/boot/common/lib LDFLAGS += -lssl -lcrypto -lcss $(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny))) LDFLAGS += -ldom -lparserutils -lhubbub -lwapcaplet -LDFLAGS += -lexpat -lcurl -liconv +LDFLAGS += -lexpat -lcurl CFLAGS += -O $(WARNFLAGS) -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE \ -Drestrict="" -Wno-multichar diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target index e6292c1f7..6e65b1333 100644 --- a/cocoa/Makefile.target +++ b/cocoa/Makefile.target @@ -7,7 +7,7 @@ POSTEXES += NetSurf.app LDFLAGS += -L/usr/lib LDFLAGS += $(shell $(PKG_CONFIG) --libs libhubbub libcss libdom) LDFLAGS += -L/usr/X11/lib -LDFLAGS += -lm -lcurl -liconv +LDFLAGS += -lm -lcurl LDFLAGS += -lssl -lcrypto CFLAGS += -O $(WARNFLAGS) -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE \ diff --git a/gtk/Makefile.defaults b/gtk/Makefile.defaults index 6c48b0cff..eb17cb127 100644 --- a/gtk/Makefile.defaults +++ b/gtk/Makefile.defaults @@ -27,6 +27,12 @@ ifeq ($(HOST),macosx) NETSURF_USE_HARU_PDF := NO endif +# Configuration overrides for OpenBSD +ifeq ($(HOST),OpenBSD) + NETSURF_USE_LIBICONV_PLUG := NO + NETSURF_USE_HARU_PDF := NO +endif + # Set default GTK version to build for (2 or 3) NETSURF_GTK_MAJOR := 2 diff --git a/windows/Makefile.target b/windows/Makefile.target index 87544e3db..93ee50a46 100644 --- a/windows/Makefile.target +++ b/windows/Makefile.target @@ -30,8 +30,7 @@ else LDFLAGS += -lhubbub -lcss -lparserutils -lwapcaplet -lcurl -lz endif -LDFLAGS += -lssl -lcrypto -lregex -liconv \ - -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows +LDFLAGS += -lssl -lcrypto -lregex -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows CFLAGS += -U__STRICT_ANSI__ -mwin32 # only windows versions after XP are supported -- cgit v1.2.3 From 4f530a3f8fff035006e2c9afbcfd233cd38a499a Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 5 Sep 2014 16:01:44 +0100 Subject: Pull warning flags out into variables that can be overriden seperately for C and C++ --- Makefile | 54 ++++++++++++++++++++++++++++++++------------- atari/Makefile.target | 2 +- beos/Makefile.target | 44 ++++++++++++++++++------------------ cocoa/Makefile.target | 3 +-- framebuffer/Makefile.target | 2 +- gtk/Makefile.target | 6 ++--- monkey/Makefile.target | 31 +++++++++++--------------- riscos/Makefile.target | 2 +- windows/Makefile.target | 2 +- 9 files changed, 82 insertions(+), 64 deletions(-) (limited to 'atari/Makefile.target') diff --git a/Makefile b/Makefile index 974691a90..81deb1b1e 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,9 @@ else ifeq ($(TARGET),) TARGET := beos endif + ifeq ($(TARGET),haiku) + TARGET := beos + endif else ifeq ($(HOST),AmigaOS) HOST := amiga @@ -131,14 +134,20 @@ ifneq ($(TARGET),riscos) endif endif -Q=@ -VQ=@ PERL=perl MKDIR=mkdir TOUCH=touch STRIP=strip SPLIT_MESSAGES=$(PERL) utils/split-messages.pl +# build verbosity +ifeq ($(V),1) + Q:= +else + Q=@ +endif +VQ=@ + # Override this only if the host compiler is called something different HOST_CC := gcc @@ -323,6 +332,7 @@ TOOLROOT := $(OBJROOT)/tools define feature_enabled ifeq ($$(NETSURF_USE_$(1)),YES) CFLAGS += $(2) + CXXFLAGS += $(2) LDFLAGS += $(3) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(4) enabled (NETSURF_USE_$(1) := YES)) @@ -348,12 +358,14 @@ endef define feature_switch ifeq ($$(NETSURF_USE_$(1)),YES) CFLAGS += $(3) + CXXFLAGS += $(3) LDFLAGS += $(4) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(2) enabled (NETSURF_USE_$(1) := YES)) endif else ifeq ($$(NETSURF_USE_$(1)),NO) CFLAGS += $(5) + CXXFLAGS += $(5) LDFLAGS += $(6) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(2) disabled (NETSURF_USE_$(1) := NO)) @@ -377,6 +389,7 @@ define pkg_config_find_and_add ifeq ($$(PKG_CONFIG_$(1)_EXISTS),yes) CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1)) + CXXFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1)) LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(1)) ifneq ($(MAKECMDGOALS),clean) $$(info PKG.CNFG: $(2) ($(1)) enabled) @@ -404,6 +417,7 @@ define pkg_config_find_and_add_enabled ifeq ($$(NETSURF_USE_$(1)),YES) ifeq ($$(NETSURF_FEATURE_$(1)_AVAILABLE),yes) CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(2)) $$(NETSURF_FEATURE_$(1)_CFLAGS) + CXXFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(2)) $$(NETSURF_FEATURE_$(1)_CFLAGS) LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(2)) $$(NETSURF_FEATURE_$(1)_LDFLAGS) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(3) ($(2)) enabled (NETSURF_USE_$(1) := YES)) @@ -417,6 +431,7 @@ define pkg_config_find_and_add_enabled else ifeq ($$(NETSURF_USE_$(1)),AUTO) ifeq ($$(NETSURF_FEATURE_$(1)_AVAILABLE),yes) CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(2)) $$(NETSURF_FEATURE_$(1)_CFLAGS) + CXXFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(2)) $$(NETSURF_FEATURE_$(1)_CFLAGS) LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(2)) $$(NETSURF_FEATURE_$(1)_LDFLAGS) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(3) ($(2)) auto-enabled (NETSURF_USE_$(1) := AUTO)) @@ -444,26 +459,31 @@ endef # General flag setup # ---------------------------------------------------------------------------- -# Set up the WARNFLAGS here so that they can be overridden in the Makefile.config -WARNFLAGS = -W -Wall -Wundef -Wpointer-arith \ - -Wcast-align -Wwrite-strings -Wstrict-prototypes \ - -Wmissing-prototypes -Wmissing-declarations \ - -Wnested-externs -Wuninitialized +# Set up the warning flags here so that they can be overridden in the +# Makefile.config +COMMON_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \ + -Wwrite-strings -Wmissing-declarations -Wuninitialized ifneq ($(CC_MAJOR),2) - WARNFLAGS += -Wno-unused-parameter + COMMON_WARNFLAGS += -Wno-unused-parameter endif # deal with lots of unwanted warnings from javascript ifeq ($(call cc_ver_ge,4,6),1) - WARNFLAGS += -Wno-unused-but-set-variable + COMMON_WARNFLAGS += -Wno-unused-but-set-variable endif # deal with chaging warning flags on differing HOST systems ifeq ($(HOST),OpenBSD) # OpenBSD headers are not compatible with redundant declaration warning - WARNFLAGS += -Wno-redundant-decls + COMMON_WARNFLAGS += -Wno-redundant-decls else - WARNFLAGS += -Wredundant-decls + COMMON_WARNFLAGS += -Wredundant-decls endif +# c++ default warning flags +CXXWARNFLAGS := + +# C default warning flags +CWARNFLAGS := -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs + # Pull in the configuration include Makefile.defaults @@ -481,12 +501,15 @@ LDFLAGS += -lz # add top level and build directory to include search path CFLAGS += -I. -I$(OBJROOT) +CXXFLAGS += -I. -I$(OBJROOT) # export the user agent format CFLAGS += -DNETSURF_UA_FORMAT_STRING=\"$(NETSURF_UA_FORMAT_STRING)\" +CXXFLAGS += -DNETSURF_UA_FORMAT_STRING=\"$(NETSURF_UA_FORMAT_STRING)\" # set the default homepage to use CFLAGS += -DNETSURF_HOMEPAGE=\"$(NETSURF_HOMEPAGE)\" +CXXFLAGS += -DNETSURF_HOMEPAGE=\"$(NETSURF_HOMEPAGE)\" # ---------------------------------------------------------------------------- # General make rules @@ -703,7 +726,7 @@ $$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created > $$(DEPROOT)/$(3) $$(VQ)echo " COMPILE: $(1)" $$(Q)$$(RM) $$(OBJROOT)/$(2) - $$(Q)$$(CC) $$(CFLAGS) -o $$(OBJROOT)/$(2) -c $(1) + $$(Q)$$(CC) $$(CFLAGS) $$(COMMON_WARNFLAGS) $$(CWARNFLAGS) -o $$(OBJROOT)/$(2) -c $(1) endef else @@ -712,7 +735,8 @@ $$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created $$(VQ)echo " COMPILE: $(1)" $$(Q)$$(RM) $$(DEPROOT)/$(3) $$(Q)$$(RM) $$(OBJROOT)/$(2) - $$(Q)$$(CC) $$(CFLAGS) -MMD -MT '$$(DEPROOT)/$(3) $$(OBJROOT)/$(2)' \ + $$(Q)$$(CC) $$(CFLAGS) $$(COMMON_WARNFLAGS) $$(CWARNFLAGS) \ + -MMD -MT '$$(DEPROOT)/$(3) $$(OBJROOT)/$(2)' \ -MF $$(DEPROOT)/$(3) -o $$(OBJROOT)/$(2) -c $(1) endef @@ -722,12 +746,12 @@ define compile_target_cpp $$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created $$(VQ)echo " DEP: $(1)" $$(Q)$$(RM) $$(DEPROOT)/$(3) - $$(Q)$$(CC) $$(CFLAGS) -MM \ + $$(Q)$$(CC) $$(CFLAGS) $$(COMMON_WARNFLAGS) $$(CXXWARNFLAGS) -MM \ $(1) | sed 's,^.*:,$$(DEPROOT)/$(3) $$(OBJROOT)/$(2):,' \ > $$(DEPROOT)/$(3) $$(VQ)echo " COMPILE: $(1)" $$(Q)$$(RM) $$(OBJROOT)/$(2) - $$(Q)$$(CXX) $$(CFLAGS) -o $$(OBJROOT)/$(2) -c $(1) + $$(Q)$$(CXX) $$(CXXFLAGS) $$(COMMON_WARNFLAGS) $$(CXXWARNFLAGS) -o $$(OBJROOT)/$(2) -c $(1) endef diff --git a/atari/Makefile.target b/atari/Makefile.target index 685140099..c9b2046f2 100644 --- a/atari/Makefile.target +++ b/atari/Makefile.target @@ -59,7 +59,7 @@ endif $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP)) $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF)) -CFLAGS += -U__STRICT_ANSI__ -std=c99 -Dsmall $(WARNFLAGS) -Dnsatari \ +CFLAGS += -U__STRICT_ANSI__ -std=c99 -Dsmall -Dnsatari \ -D_BSD_SOURCE \ -D_XOPEN_SOURCE=600 \ -D_POSIX_C_SOURCE=200112L \ diff --git a/beos/Makefile.target b/beos/Makefile.target index bbeb0be22..f8f329266 100644 --- a/beos/Makefile.target +++ b/beos/Makefile.target @@ -4,21 +4,21 @@ $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) )) +$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny))) +# Linker flags LDFLAGS += -L/boot/home/config/lib # for Haiku LDFLAGS += -L/boot/common/lib -# some people do *not* have libm... LDFLAGS += -lssl -lcrypto -lcss -$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny))) LDFLAGS += -ldom -lparserutils -lhubbub -lwapcaplet LDFLAGS += -lexpat -lcurl -CFLAGS += -O $(WARNFLAGS) -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE \ - -Drestrict="" -Wno-multichar -# DEBUG -CFLAGS += -g -O0 -# -DDEBUG=1 +COMMON_WARNFLAGS += -Wno-multichar + +# compiler flags +CFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g -O0 +CXXFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g -O0 BEOS_BERES := beres BEOS_RC := rc @@ -30,38 +30,40 @@ VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/ver VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c) RSRC_BEOS = $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.rdef,%.rsrc,$(RDEF_BEOS)))) RESOURCES = $(RSRC_BEOS) + ifeq ($(HOST),beos) - CFLAGS += -I/boot/home/config/include \ + CFLAGS += -I/boot/home/config/include \ -I/boot/home/config/include/hubbub \ -I/boot/home/config/include/libcss \ -I/boot/home/config/include/parserutils - ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),) - LDFLAGS += -lzeta - endif - ifneq ($(wildcard /boot/system/develop/lib/*/libnetwork.so),) + ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),) + LDFLAGS += -lzeta + endif + ifneq ($(wildcard /boot/system/develop/lib/*/libnetwork.so),) # Haiku CFLAGS += -I/boot/common/include \ -I/boot/common/include/hubbub \ -I/boot/common/include/libcss \ -I/boot/common/include/parserutils NETLDFLAGS := -lnetwork - else - ifneq ($(wildcard /boot/develop/lib/*/libbind.so),) + else + ifneq ($(wildcard /boot/develop/lib/*/libbind.so),) # BONE NETLDFLAGS := -lsocket -lbind - else + else # net_server, will probably never work NETLDFLAGS := -lnet - endif endif - else + endif +else # cross: Haiku ? NETLDFLAGS := -lnetwork - endif - LDFLAGS += -lbe -ltranslation -ltracker $(NETLDFLAGS) - ifeq ($(CC_MAJOR),2) +endif + +LDFLAGS += -lbe -ltranslation -ltracker $(NETLDFLAGS) +ifeq ($(CC_MAJOR),2) LDFLAGS += -lstdc++.r4 - else +else LDFLAGS += -lstdc++ -lsupc++ endif diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target index 6e65b1333..d5b983a98 100644 --- a/cocoa/Makefile.target +++ b/cocoa/Makefile.target @@ -10,8 +10,7 @@ LDFLAGS += -L/usr/X11/lib LDFLAGS += -lm -lcurl LDFLAGS += -lssl -lcrypto -CFLAGS += -O $(WARNFLAGS) -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE \ - -std=c99 -g -Os +CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -g -Os CFLAGS += $(shell $(PKG_CONFIG) --cflags libhubbub libcss libdom) diff --git a/framebuffer/Makefile.target b/framebuffer/Makefile.target index 87156e86f..44b9626ed 100644 --- a/framebuffer/Makefile.target +++ b/framebuffer/Makefile.target @@ -42,7 +42,7 @@ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF)) $(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript)) $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript)) -CFLAGS += -std=c99 -g -Dsmall $(WARNFLAGS) \ +CFLAGS += -std=c99 -g -Dsmall \ -D_BSD_SOURCE \ -D_XOPEN_SOURCE=600 \ -D_POSIX_C_SOURCE=200112L \ diff --git a/gtk/Makefile.target b/gtk/Makefile.target index 513cb22de..05865ff74 100644 --- a/gtk/Makefile.target +++ b/gtk/Makefile.target @@ -44,14 +44,13 @@ GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \ # libsexy currently means we cannot enable this # -DGDK_DISABLE_DEPRECATED -GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \ +GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk -g \ $(GTKDEPFLAGS) \ -D_BSD_SOURCE \ -D_XOPEN_SOURCE=600 \ -D_POSIX_C_SOURCE=200809L \ -D_NETBSD_SOURCE \ - -DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" \ - $(WARNFLAGS) -g + -DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" # non optional pkg-configed libs $(eval $(call pkg_config_find_and_add,libcss,CSS)) @@ -63,7 +62,6 @@ $(eval $(call pkg_config_find_and_add,gtk+-$(NETSURF_GTK_MAJOR).0,GTK-$(NETSURF_ $(eval $(call pkg_config_find_and_add,gthread-2.0,GThread2)) $(eval $(call pkg_config_find_and_add,gmodule-2.0,GModule2)) - CFLAGS += $(GTKCFLAGS) LDFLAGS += -lm diff --git a/monkey/Makefile.target b/monkey/Makefile.target index 1b0ec163d..d3c974782 100644 --- a/monkey/Makefile.target +++ b/monkey/Makefile.target @@ -33,24 +33,19 @@ $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript)) # no pkg-config for this library $(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp))) -WARNFLAGS += -Werror - -MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \ - -D_BSD_SOURCE \ - -D_XOPEN_SOURCE=600 \ - -D_POSIX_C_SOURCE=200112L \ - -D_NETBSD_SOURCE \ - -DMONKEY_RESPATH=\"$(NETSURF_MONKEY_RESOURCES)\" \ - $(WARNFLAGS) -g \ - $(shell $(PKG_CONFIG) --cflags glib-2.0) \ - $(shell $(PKG_CONFIG) --cflags libdom libcurl) \ - $(shell $(PKG_CONFIG) --cflags openssl) - -MONKEYLDFLAGS := -lm $(shell $(PKG_CONFIG) --cflags --libs glib-2.0) - - -CFLAGS += $(MONKEYCFLAGS) -LDFLAGS += $(MONKEYLDFLAGS) +CWARNFLAGS += -Werror + +CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \ + -D_BSD_SOURCE \ + -D_XOPEN_SOURCE=600 \ + -D_POSIX_C_SOURCE=200112L \ + -D_NETBSD_SOURCE \ + -DMONKEY_RESPATH=\"$(NETSURF_MONKEY_RESOURCES)\" \ + $(shell $(PKG_CONFIG) --cflags glib-2.0) \ + $(shell $(PKG_CONFIG) --cflags libdom libcurl) \ + $(shell $(PKG_CONFIG) --cflags openssl) + +LDFLAGS += -lm $(shell $(PKG_CONFIG) --cflags --libs glib-2.0) # --------------------------------------------------------------------------- # Windows flag setup diff --git a/riscos/Makefile.target b/riscos/Makefile.target index 2f5bbb150..46ca34116 100644 --- a/riscos/Makefile.target +++ b/riscos/Makefile.target @@ -42,7 +42,7 @@ TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \ RESOURCES = $(TPD_RISCOS) split-messages -CFLAGS += $(WARNFLAGS) -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \ +CFLAGS += -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \ -mpoke-function-name -fno-strict-aliasing CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include diff --git a/windows/Makefile.target b/windows/Makefile.target index 93ee50a46..a4aaba1e4 100644 --- a/windows/Makefile.target +++ b/windows/Makefile.target @@ -42,7 +42,7 @@ CFLAGS += '-D_WIN32_IE=0x0501' #installed resource path CFLAGS += '-DNETSURF_WINDOWS_RESPATH="$(NETSURF_WINDOWS_RESPATH)"' -WSCFLAGS := -std=c99 $(WARNFLAGS) -DCURL_STATICLIB -DCARES_STATICLIB -g +WSCFLAGS := -std=c99 -DCURL_STATICLIB -DCARES_STATICLIB -g CFLAGS += $(WSCFLAGS) LDFLAGS += $(WSCFLAGS) -- cgit v1.2.3