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) ))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
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 -liconv
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += -O $(WARNFLAGS) -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE \
|
|
|
|
-Drestrict="" -Wno-multichar
|
|
|
|
# DEBUG
|
|
|
|
CFLAGS += -g -O0
|
|
|
|
# -DDEBUG=1
|
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)
|
|
|
|
RSRC_BEOS = $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.rdef,%.rsrc,$(RDEF_BEOS))))
|
|
|
|
RESOURCES = $(RSRC_BEOS)
|
|
|
|
ifeq ($(HOST),beos)
|
2010-10-27 22:39:24 +04:00
|
|
|
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/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),)
|
|
|
|
# BONE
|
|
|
|
NETLDFLAGS := -lsocket -lbind
|
|
|
|
else
|
|
|
|
# net_server, will probably never work
|
|
|
|
NETLDFLAGS := -lnet
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
# cross: Haiku ?
|
|
|
|
NETLDFLAGS := -lnetwork
|
|
|
|
endif
|
2012-11-25 21:11:56 +04:00
|
|
|
LDFLAGS += -lbe -ltranslation -ltracker $(NETLDFLAGS)
|
2012-12-14 15:30:14 +04:00
|
|
|
ifeq ($(CC_MAJOR),2)
|
2012-11-25 21:11:56 +04:00
|
|
|
LDFLAGS += -lstdc++.r4
|
|
|
|
else
|
|
|
|
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
|
|
|
|
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 \
|
2013-09-02 19:39:46 +04:00
|
|
|
scaffolding.cpp search.cpp schedule.cpp thumbnail.cpp \
|
2013-05-28 15:55:34 +04:00
|
|
|
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 \
|
2012-11-25 21:04:57 +04:00
|
|
|
netsurf.png ca-bundle.txt
|
2010-10-29 04:54:27 +04:00
|
|
|
RDEP_BEOS := $(addprefix beos/res/,$(RDEP_BEOS)) \
|
2013-12-31 17:44:12 +04:00
|
|
|
$(wildcard beos/res/icons/*.png) \
|
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
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# 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
|
2012-11-16 01:34:42 +04:00
|
|
|
$(call split_install_messages, beos, $(DESTDIR)$(NETSURF_BEOS_RESOURCES))
|
2012-08-23 14:46:31 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
package-beos:
|