summaryrefslogtreecommitdiff
path: root/beos/Makefile.target
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-10-27 18:39:24 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-10-27 18:39:24 +0000
commit72cf3adc786a8fe19e29ad6eec313a11f8d88139 (patch)
treef1af6dce09e3a229e40bb0148d4d9fd07d869dfe /beos/Makefile.target
parentc07c79cc5e54d7faee8dadb40140c05e92f375d1 (diff)
downloadnetsurf-72cf3adc786a8fe19e29ad6eec313a11f8d88139.tar.gz
netsurf-72cf3adc786a8fe19e29ad6eec313a11f8d88139.tar.bz2
Beginning of NetSurf build infrastructure cleanup
Provide makefile fragment for each target, isolates the target makefile changes into one place simplifying the top level makefile svn path=/trunk/netsurf/; revision=10910
Diffstat (limited to 'beos/Makefile.target')
-rw-r--r--beos/Makefile.target81
1 files changed, 81 insertions, 0 deletions
diff --git a/beos/Makefile.target b/beos/Makefile.target
new file mode 100644
index 000000000..09eda57ba
--- /dev/null
+++ b/beos/Makefile.target
@@ -0,0 +1,81 @@
+# ----------------------------------------------------------------------------
+# BeOS target setup
+# ----------------------------------------------------------------------------
+
+
+ $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
+
+ LDFLAGS += -L/boot/home/config/lib
+ # for Haiku
+ LDFLAGS += -L/boot/common/lib
+ # some people do *not* have libm...
+ LDFLAGS += -lxml2 -lcurl -liconv
+ LDFLAGS += -lssl -lcrypto -lhubbub -lcss -lparserutils -lwapcaplet
+
+ CFLAGS += -I. -O $(WARNFLAGS) -Dnsbeos \
+ -D_BSD_SOURCE -D_POSIX_C_SOURCE \
+ -Drestrict="" -Wno-multichar
+ # DEBUG
+ CFLAGS += -g -O0
+ # -DDEBUG=1
+
+ BEOS_BERES := beres
+ BEOS_RC := rc
+ BEOS_XRES := xres
+ BEOS_SETVER := setversion
+ BEOS_MIMESET := mimeset
+ VERSION_FULL := $(shell sed -n '/"/{s/.*"\(.*\)".*/\1/;p;}' desktop/version.c)
+ VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
+ 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 \
+ -I/boot/home/config/include/libxml2 \
+ -I/boot/home/config/include/libmng \
+ -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/develop/lib/*/libnetwork.so),)
+ # Haiku
+ CFLAGS += -I/boot/common/include \
+ -I/boot/common/include/libxml2 \
+ -I/boot/common/include/libmng \
+ -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),)
+ # BONE
+ NETLDFLAGS := -lsocket -lbind
+ else
+ # net_server, will probably never work
+ NETLDFLAGS := -lnet
+ endif
+ endif
+ else
+ # cross: Haiku ?
+ NETLDFLAGS := -lnetwork
+ endif
+ LDFLAGS += -lbe -ltranslation $(NETLDFLAGS)
+
+ $(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
+ ifeq ($(HOST),beos)
+ CFLAGS += -I$(PREFIX)/include
+ LDFLAGS += -L$(PREFIX)/lib
+ $(eval $(call feature_enabled,BMP,-DWITH_BMP,-lnsbmp,BMP (libnsbmp)))
+ $(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
+ $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
+ else
+ NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
+ NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
+ NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
+ $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
+ endif
+