mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
move frontends into sub directory
This commit is contained in:
parent
2cbb337756
commit
d21447d096
14
.gitignore
vendored
14
.gitignore
vendored
@ -1,6 +1,4 @@
|
||||
*~
|
||||
gtk/res/toolbarIndices
|
||||
windows/res/preferences
|
||||
\!NetSurf/!Run,feb
|
||||
\!NetSurf/!RunImage,ff8
|
||||
\!NetSurf/!Help,feb
|
||||
@ -13,11 +11,13 @@ windows/res/preferences
|
||||
\!NetSurf/Resources/nl/Templates,fec
|
||||
\!NetSurf/Resources/nl/Messages
|
||||
\!NetSurf/Resources/it/Messages
|
||||
gtk/res/en/Messages
|
||||
gtk/res/fr/Messages
|
||||
gtk/res/de/Messages
|
||||
gtk/res/nl/Messages
|
||||
gtk/res/it/Messages
|
||||
frontends/windows/res/preferences
|
||||
frontends/gtk/res/toolbarIndices
|
||||
frontends/gtk/res/en/Messages
|
||||
frontends/gtk/res/fr/Messages
|
||||
frontends/gtk/res/de/Messages
|
||||
frontends/gtk/res/nl/Messages
|
||||
frontends/gtk/res/it/Messages
|
||||
test/nsoption
|
||||
test/nsurl
|
||||
test/urldbtest
|
||||
|
33
Makefile
33
Makefile
@ -511,13 +511,36 @@ $(eval $(call pkg_config_find_and_add,libcss,CSS))
|
||||
$(eval $(call pkg_config_find_and_add,libdom,DOM))
|
||||
$(eval $(call pkg_config_find_and_add,libnsutils,nsutils))
|
||||
$(eval $(call pkg_config_find_and_add,libutf8proc,utf8proc))
|
||||
$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
|
||||
# freemint does not support pkg-config for libcurl
|
||||
ifeq ($(HOST),mint)
|
||||
CFLAGS += $(shell curl-config --cflags)
|
||||
LDFLAGS += $(shell curl-config --libs)
|
||||
else
|
||||
$(eval $(call pkg_config_find_and_add,libcurl,Curl))
|
||||
endif
|
||||
|
||||
# Common libraries without pkg-config support
|
||||
LDFLAGS += -lz
|
||||
|
||||
# Optional libraries with pkgconfig
|
||||
|
||||
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs
|
||||
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
|
||||
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
|
||||
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
|
||||
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
|
||||
NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
|
||||
|
||||
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,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,NSSVG,libsvgtiny,SVG))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
|
||||
|
||||
# add top level and build directory to include search path
|
||||
CFLAGS += -I. -I$(OBJROOT)
|
||||
CXXFLAGS += -I. -I$(OBJROOT)
|
||||
CFLAGS += -I. -Ifrontends -I$(OBJROOT)
|
||||
CXXFLAGS += -I. -Ifrontends -I$(OBJROOT)
|
||||
|
||||
# export the user agent format
|
||||
CFLAGS += -DNETSURF_UA_FORMAT_STRING=\"$(NETSURF_UA_FORMAT_STRING)\"
|
||||
@ -553,7 +576,7 @@ POSTEXES :=
|
||||
# Target specific setup
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
include $(TARGET)/Makefile.target
|
||||
include frontends/Makefile
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# General source file setup
|
||||
@ -647,10 +670,10 @@ else
|
||||
$(Q)$(RM) $(EXETARGET:,ff8=,e1f)
|
||||
endif
|
||||
ifeq ($(TARGET),windows)
|
||||
$(Q)$(TOUCH) windows/res/preferences
|
||||
$(Q)$(TOUCH) frontends/windows/res/preferences
|
||||
endif
|
||||
ifeq ($(TARGET),gtk)
|
||||
$(Q)$(TOUCH) gtk/res/toolbarIndices
|
||||
$(Q)$(TOUCH) frontends/gtk/res/toolbarIndices
|
||||
endif
|
||||
ifeq ($(NETSURF_STRIP_BINARY),YES)
|
||||
$(VQ)echo " STRIP: $(EXETARGET)"
|
||||
|
@ -125,7 +125,7 @@ endif
|
||||
# ----------------------------------------------------------------------------
|
||||
# Option overrides determined by specific TARGET
|
||||
# ----------------------------------------------------------------------------
|
||||
-include $(TARGET)/Makefile.defaults
|
||||
-include frontends/$(TARGET)/Makefile.defaults
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
@ -1,156 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# BeOS target setup
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
$(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
|
||||
LDFLAGS += -lssl -lcrypto -lcss
|
||||
LDFLAGS += -ldom -lparserutils -lhubbub -lwapcaplet
|
||||
LDFLAGS += -lexpat -lcurl
|
||||
|
||||
COMMON_WARNFLAGS += -Wno-multichar
|
||||
|
||||
# compiler flags
|
||||
CFLAGS += -std=c99 -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
||||
CXXFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
||||
|
||||
BEOS_BERES := beres
|
||||
BEOS_RC := rc
|
||||
BEOS_XRES := xres
|
||||
BEOS_SETVER := setversion
|
||||
BEOS_MIMESET := mimeset
|
||||
|
||||
VERSION_FULL := $(shell sed -n '/_version.*=.*"/{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)
|
||||
|
||||
ifeq ($(HOST),beos)
|
||||
CFLAGS += -I/boot/home/config/include \
|
||||
-I/boot/home/config/include/hubbub \
|
||||
-I/boot/home/config/include/libcss \
|
||||
-I/boot/home/config/include/parserutils
|
||||
CXXFLAGS += -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),)
|
||||
# Haiku
|
||||
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 -ltracker -lcolumnlistview $(NETLDFLAGS)
|
||||
ifeq ($(CC_MAJOR),2)
|
||||
LDFLAGS += -lstdc++.r4
|
||||
else
|
||||
LDFLAGS += -lstdc++ -lsupc++
|
||||
endif
|
||||
|
||||
ifeq ($(HOST),beos)
|
||||
CFLAGS += -I$(PREFIX)/include
|
||||
CXXFLAGS += -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
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Source file setup
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# S_BEOS are sources purely for the BeOS build
|
||||
S_BEOS := about.cpp bitmap.cpp cookies.cpp \
|
||||
download.cpp fetch_rsrc.cpp filetype.cpp \
|
||||
font.cpp gui.cpp login.cpp gui_options.cpp plotters.cpp \
|
||||
scaffolding.cpp search.cpp schedule.cpp throbber.cpp window.cpp
|
||||
S_BEOS := $(addprefix beos/,$(S_BEOS))
|
||||
|
||||
RDEF_BEOS := res.rdef
|
||||
RDEF_BEOS := $(addprefix beos/,$(RDEF_BEOS))
|
||||
|
||||
RDEF_IMP_BEOS := res_import.rdef
|
||||
RDEF_IMP_BEOS := $(addprefix $(OBJROOT)/,$(subst /,_,$(RDEF_IMP_BEOS)))
|
||||
|
||||
RDEP_BEOS := \
|
||||
adblock.css beosdefault.css default.css internal.css quirks.css \
|
||||
netsurf.png favicon.png ca-bundle.txt \
|
||||
credits.html licence.html welcome.html maps.html SearchEngines
|
||||
RDEP_BEOS := $(addprefix beos/res/,$(RDEP_BEOS)) \
|
||||
$(wildcard beos/res/icons/*.png) \
|
||||
$(wildcard beos/res/??/*) \
|
||||
$(wildcard beos/res/throbber/throbber*.png)
|
||||
|
||||
|
||||
# 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)
|
||||
EXETARGET := NetSurf
|
||||
|
||||
# The filter and target for split messages
|
||||
MESSAGES_FILTER=beos
|
||||
MESSAGES_TARGET=beos/res
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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 $@ $^
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Install target
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
install-beos:
|
||||
mkdir -p $(DESTDIR)$(NETSURF_BEOS_BIN)
|
||||
mkdir -p $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
||||
@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/SearchEngines $(DESTDIR)$(NETSURF_BEOS_RESOURCES)
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Package target
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
package-beos:
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/Icons/
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/AdBlock,f79
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/ca-bundle
|
@ -1 +0,0 @@
|
||||
../../../!NetSurf/Resources/de/Messages
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/CSS,f79
|
@ -1 +0,0 @@
|
||||
../../../!NetSurf/Resources/fr/Messages
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/internal.css,f79
|
@ -1 +0,0 @@
|
||||
../../../!NetSurf/Resources/it/Messages
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/netsurf.png,b60
|
@ -1 +0,0 @@
|
||||
../../../!NetSurf/Resources/nl/Messages
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/Quirks,f79
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/en/Messages
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/AdBlock,f79
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/en/credits.html,faf
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/CSS,f79
|
@ -1 +0,0 @@
|
||||
../../gtk/res/favicon.png
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/internal.css,f79
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/en/licence.html,faf
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/en/welcome.html,faf
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/netsurf.png,b60
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/Quirks,f79
|
@ -1 +0,0 @@
|
||||
../../!NetSurf/Resources/en/welcome.html,faf
|
9
frontends/Makefile
Normal file
9
frontends/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
# NetSurf Frontend sources
|
||||
|
||||
FRONTEND_SOURCE_DIR := frontends/$(TARGET)
|
||||
FRONTEND_RESOURCES_DIR := frontends/$(TARGET)/res
|
||||
|
||||
# Target Specific setup
|
||||
include frontends/$(TARGET)/Makefile
|
||||
|
||||
S_FRONTEND := $(addprefix frontends/$(TARGET)/,$(S_FRONTEND))
|
@ -33,17 +33,10 @@ ifeq ($(HOST),amiga)
|
||||
LDFLAGS += -lcurl -lrtmp -lpthread -ltre -lintl -lpbl
|
||||
LDFLAGS += -lssl -lcrypto -ldom -lhubbub -lcss -lparserutils -lwapcaplet
|
||||
else
|
||||
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
|
||||
$(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))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,NSSVG))
|
||||
$(eval $(call feature_enabled,MOZJS,-DXP_AMIGA -DWITH_MOZJS -DJS_VERSION=170 -DJSVERSION_LATEST=170 -DJSOPTION_JIT=0 -DJSCLASS_GLOBAL_FLAGS=0,-ljs,JavaScript))
|
||||
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
|
||||
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
|
||||
|
||||
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libcurl openssl)
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags tre)
|
||||
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --static --libs libcurl openssl)
|
||||
@ -66,23 +59,22 @@ MESSAGES_FILTER=ami
|
||||
# Source file setup
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# S_AMIGA are sources purely for the Amiga build
|
||||
S_AMIGA := gui.c tree.c history.c hotlist.c schedule.c file.c \
|
||||
misc.c bitmap.c font.c filetype.c utf8.c login.c \
|
||||
# sources purely for the Amiga build
|
||||
S_FRONTEND := gui.c tree.c history.c hotlist.c schedule.c file.c \
|
||||
misc.c bitmap.c font.c filetype.c utf8.c login.c \
|
||||
plotters.c object.c menu.c save_pdf.c arexx.c version.c \
|
||||
cookies.c ctxmenu.c clipboard.c help.c font_scan.c \
|
||||
cookies.c ctxmenu.c clipboard.c help.c font_scan.c \
|
||||
launch.c search.c history_local.c download.c iff_dr2d.c \
|
||||
sslcert.c gui_options.c print.c theme.c drag.c icon.c libs.c \
|
||||
datatypes.c dt_picture.c dt_anim.c dt_sound.c plugin_hack.c \
|
||||
stringview/stringview.c stringview/urlhistory.c rtg.c \
|
||||
agclass/amigaguide_class.c os3support.c font_diskfont.c \
|
||||
selectmenu.c hash/xxhash.c font_cache.c font_bullet.c
|
||||
S_AMIGA := $(addprefix amiga/,$(S_AMIGA))
|
||||
|
||||
# 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_AMIGA)
|
||||
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND)
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Install target
|
||||
@ -99,8 +91,8 @@ package-amiga: netsurf.lha
|
||||
AMIGA_LANGUAGES := de en it ja nl
|
||||
AMIGA_PLATFORM_RESOURCES := Pointers Themes default.css default.css.info favicon.png LangNames mimetypes Resource.map SearchEngines splash.png
|
||||
AMIGA_GENERIC_RESOURCES := $(AMIGA_LANGUAGES) ca-bundle Icons
|
||||
AMIGA_RESOURCES := $(addprefix amiga/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix \!NetSurf/Resources/,$(AMIGA_GENERIC_RESOURCES))
|
||||
AMIGA_DISTRIBUTION_FILES := amiga/dist/*
|
||||
AMIGA_RESOURCES := $(addprefix $(FRONTEND_SOURCE_DIR)/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix \!NetSurf/Resources/,$(AMIGA_GENERIC_RESOURCES))
|
||||
AMIGA_DISTRIBUTION_FILES := $(FRONTEND_SOURCE_DIR)/dist/*
|
||||
AMIGA_INSTALL_TARGET_DIR := NetSurf_Amiga
|
||||
|
||||
netsurf.lha: $(EXETARGET)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user