2010-10-27 22:39:24 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# BeOS target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
|
2014-09-05 19:01:44 +04:00
|
|
|
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
# Linker flags
|
2012-12-20 19:27:07 +04:00
|
|
|
LDFLAGS += -L/boot/home/config/lib
|
|
|
|
# for Haiku
|
|
|
|
LDFLAGS += -L/boot/common/lib
|
|
|
|
LDFLAGS += -lssl -lcrypto -lcss
|
|
|
|
LDFLAGS += -ldom -lparserutils -lhubbub -lwapcaplet
|
2014-04-30 14:56:05 +04:00
|
|
|
LDFLAGS += -lexpat -lcurl
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
COMMON_WARNFLAGS += -Wno-multichar
|
|
|
|
|
|
|
|
# compiler flags
|
2015-08-17 21:09:47 +03:00
|
|
|
CFLAGS += -std=c99 -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
|
|
|
CXXFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
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)
|
2014-09-05 19:01:44 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
ifeq ($(HOST),beos)
|
2014-09-05 19:01:44 +04:00
|
|
|
CFLAGS += -I/boot/home/config/include \
|
2010-10-27 22:39:24 +04:00
|
|
|
-I/boot/home/config/include/hubbub \
|
|
|
|
-I/boot/home/config/include/libcss \
|
|
|
|
-I/boot/home/config/include/parserutils
|
2014-09-05 19:32:19 +04:00
|
|
|
CXXFLAGS += -I/boot/home/config/include \
|
|
|
|
-I/boot/home/config/include/hubbub \
|
|
|
|
-I/boot/home/config/include/libcss \
|
|
|
|
-I/boot/home/config/include/parserutils
|
2014-09-05 19:01:44 +04:00
|
|
|
ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),)
|
|
|
|
LDFLAGS += -lzeta
|
|
|
|
endif
|
2015-07-13 20:45:02 +03:00
|
|
|
ifneq ($(wildcard /boot/system/develop/lib/libnetwork.so),)
|
2010-10-27 22:39:24 +04:00
|
|
|
# Haiku
|
|
|
|
NETLDFLAGS := -lnetwork
|
2014-09-05 19:01:44 +04:00
|
|
|
else
|
|
|
|
ifneq ($(wildcard /boot/develop/lib/*/libbind.so),)
|
2010-10-27 22:39:24 +04:00
|
|
|
# BONE
|
|
|
|
NETLDFLAGS := -lsocket -lbind
|
2014-09-05 19:01:44 +04:00
|
|
|
else
|
2010-10-27 22:39:24 +04:00
|
|
|
# net_server, will probably never work
|
|
|
|
NETLDFLAGS := -lnet
|
|
|
|
endif
|
2014-09-05 19:01:44 +04:00
|
|
|
endif
|
|
|
|
else
|
2010-10-27 22:39:24 +04:00
|
|
|
# cross: Haiku ?
|
|
|
|
NETLDFLAGS := -lnetwork
|
2014-09-05 19:01:44 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
LDFLAGS += -lbe -ltranslation -ltracker $(NETLDFLAGS)
|
|
|
|
ifeq ($(CC_MAJOR),2)
|
2012-11-25 21:11:56 +04:00
|
|
|
LDFLAGS += -lstdc++.r4
|
2014-09-05 19:01:44 +04:00
|
|
|
else
|
2012-11-25 21:11:56 +04:00
|
|
|
LDFLAGS += -lstdc++ -lsupc++
|
2012-12-20 19:27:07 +04:00
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
ifeq ($(HOST),beos)
|
|
|
|
CFLAGS += -I$(PREFIX)/include
|
2014-09-05 19:32:19 +04:00
|
|
|
CXXFLAGS += -I$(PREFIX)/include
|
2012-12-20 19:27:07 +04:00
|
|
|
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_enabled,BMP,libnsbmp,BMP))
|
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
|
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
|
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_BEOS are sources purely for the BeOS build
|
2012-11-16 01:34:42 +04:00
|
|
|
S_BEOS := about.cpp bitmap.cpp download.cpp fetch_rsrc.cpp filetype.cpp \
|
2012-12-20 19:27:07 +04:00
|
|
|
font.cpp gui.cpp login.cpp gui_options.cpp plotters.cpp \
|
2015-04-24 15:52:39 +03:00
|
|
|
scaffolding.cpp search.cpp schedule.cpp throbber.cpp window.cpp
|
2010-10-29 04:54:27 +04:00
|
|
|
S_BEOS := $(addprefix beos/,$(S_BEOS))
|
2011-05-08 05:03:44 +04:00
|
|
|
|
2012-03-23 01:48:24 +04:00
|
|
|
RDEF_BEOS := res.rdef
|
2010-10-29 04:54:27 +04:00
|
|
|
RDEF_BEOS := $(addprefix beos/,$(RDEF_BEOS))
|
2011-05-08 05:03:44 +04:00
|
|
|
|
2012-03-23 01:48:24 +04:00
|
|
|
RDEF_IMP_BEOS := res_import.rdef
|
2011-05-08 05:03:44 +04:00
|
|
|
RDEF_IMP_BEOS := $(addprefix $(OBJROOT)/,$(subst /,_,$(RDEF_IMP_BEOS)))
|
|
|
|
|
|
|
|
RDEP_BEOS := \
|
|
|
|
adblock.css beosdefault.css default.css internal.css quirks.css \
|
2013-12-31 18:13:36 +04:00
|
|
|
netsurf.png favicon.png ca-bundle.txt \
|
2014-10-22 23:39:43 +04:00
|
|
|
credits.html licence.html welcome.html maps.html
|
2010-10-29 04:54:27 +04:00
|
|
|
RDEP_BEOS := $(addprefix beos/res/,$(RDEP_BEOS)) \
|
2013-12-31 18:13:36 +04:00
|
|
|
$(wildcard beos/res/icons/*.png) \
|
|
|
|
$(wildcard beos/res/??/*) \
|
2010-10-29 04:54:27 +04:00
|
|
|
$(wildcard beos/res/throbber/throbber*.png)
|
|
|
|
|
|
|
|
|
2011-08-28 18:29:15 +04:00
|
|
|
# This is the final source build list
|
|
|
|
# Note this is deliberately *not* expanded here as common and image
|
|
|
|
# are not yet available
|
|
|
|
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_BEOS)
|
2010-10-29 04:54:27 +04:00
|
|
|
EXETARGET := NetSurf
|
2012-08-23 14:46:31 +04:00
|
|
|
|
2015-04-07 02:36:21 +03:00
|
|
|
# The filter and target for split messages
|
|
|
|
MESSAGES_FILTER=beos
|
|
|
|
|
2015-04-05 16:53:59 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Resources
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
RSRC_BEOS = $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.rdef,%.rsrc,$(RDEF_BEOS))))
|
|
|
|
RESOURCES = $(RSRC_BEOS)
|
|
|
|
|
|
|
|
$(RDEF_IMP_BEOS): $(RDEP_BEOS)
|
|
|
|
$(VQ)echo " GEN: $@"
|
|
|
|
$(Q)n=5000; for f in $^; do echo "resource($$n,\"$${f#beos/res/}\") #'data' import \"$${f#beos/}\";"; n=$$(($$n+1)); done > $@
|
|
|
|
|
|
|
|
$(RSRC_BEOS): $(RDEF_BEOS) $(RDEF_IMP_BEOS)
|
|
|
|
$(VQ)echo " RC: $<"
|
|
|
|
$(Q)$(BEOS_RC) -I beos -o $@ $^
|
|
|
|
|
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
install-beos:
|
|
|
|
# TODO:HAIKU -- not sure if throbber is needed. being left out for now.
|
|
|
|
mkdir -p $(DESTDIR)$(NETSURF_BEOS_BIN)
|
|
|
|
mkdir -p $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
# mkdir -p $(DESTDIR)$(NETSURF_BEOS_RESOURCES)throbber
|
|
|
|
@copyattr -d $(EXETARGET) $(DESTDIR)$(NETSURF_BEOS_BIN)NetSurf
|
|
|
|
@cp -vRL beos/res/adblock.css $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
@cp -vRL beos/res/ca-bundle.txt $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
@cp -vRL beos/res/default.css $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
@cp -vRL beos/res/beosdefault.css $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
@cp -vRL gtk/res/license $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
|
|
|
# @cp -vRL beos/res/throbber/*.png $(DESTDIR)$(NETSURF_BEOS_RESOURCES)throbber
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
package-beos:
|