Purge old buildsystem.
Rename Makefile.unix to Makefile. svn path=/trunk/netsurf/; revision=3970
This commit is contained in:
parent
71be1d1ed8
commit
ad71e4de6b
|
@ -6,9 +6,9 @@
|
|||
#
|
||||
|
||||
# Trivially, invoke as:
|
||||
# make -f Makefile.unix
|
||||
# make
|
||||
# to build native, or:
|
||||
# make -f Makefile.unix TARGET=riscos
|
||||
# make TARGET=riscos
|
||||
# to cross-build for RO.
|
||||
#
|
||||
# Tested on unix platforms (building for GTK and cross-compiling for RO) and
|
||||
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
# To build developer Doxygen generated documentation, invoke as above,
|
||||
# with the 'docs' target:
|
||||
# make -f Makefile.unix docs
|
||||
# make docs
|
||||
#
|
||||
|
||||
all: all-program
|
205
makefile
205
makefile
|
@ -1,205 +0,0 @@
|
|||
#
|
||||
# This file is part of NetSurf, http://netsurf-browser.org/
|
||||
# Licensed under the GNU General Public License,
|
||||
# http://www.opensource.org/licenses/gpl-license
|
||||
#
|
||||
|
||||
# There are 6 possible builds of NetSurf:
|
||||
#
|
||||
# riscos -- standard RISC OS build
|
||||
# riscos_small -- identical to "riscos", but linked with smaller libraries
|
||||
# (no openssl, and libcurl without ssl support)
|
||||
# debug -- command line Unix/Linux, for debugging
|
||||
# riscos_debug -- a cross between "riscos" and "debug"
|
||||
# gtk -- experimental gtk version
|
||||
#
|
||||
# "riscos", "riscos_small", and "riscos_debug" can be compiled under
|
||||
# RISC OS, or cross-compiled using GCCSDK.
|
||||
|
||||
SYSTEM_CC ?= gcc
|
||||
|
||||
OBJECTS_COMMON = content.o fetch.o fetchcache.o urldb.o # content/
|
||||
OBJECTS_COMMON += fetch_curl.o fetch_data.o # content/fetchers/
|
||||
OBJECTS_COMMON += css.o css_enum.o parser.o ruleset.o scanner.o # css/
|
||||
OBJECTS_COMMON += box.o box_construct.o box_normalise.o directory.o \
|
||||
form.o html.o html_redraw.o imagemap.o layout.o list.o \
|
||||
table.o textplain.o # render/
|
||||
OBJECTS_COMMON += base64.o filename.o hashtable.o messages.o \
|
||||
talloc.o url.o utf8.o utils.o useragent.o # utils/
|
||||
OBJECTS_COMMON += knockout.o options.o tree.o version.o # desktop/
|
||||
|
||||
OBJECTS_IMAGE = bmp.o bmpread.o gif.o gifread.o ico.o jpeg.o \
|
||||
mng.o svg.o rsvg.o # image/
|
||||
|
||||
OBJECTS_RISCOS = $(OBJECTS_COMMON) $(OBJECTS_IMAGE)
|
||||
OBJECTS_RISCOS += browser.o frames.o history_core.o netsurf.o \
|
||||
selection.o textinput.o # desktop/
|
||||
OBJECTS_RISCOS += 401login.o artworks.o assert.o awrender.o bitmap.o \
|
||||
buffer.o cookies.o configure.o debugwin.o \
|
||||
dialog.o download.o draw.o filetype.o font.o \
|
||||
global_history.o gui.o help.o history.o hotlist.o image.o \
|
||||
menus.o message.o palettes.o plotters.o plugin.o print.o \
|
||||
query.o save.o save_complete.o save_draw.o save_text.o \
|
||||
schedule.o search.o sprite.o sslcert.o textarea.o \
|
||||
textselection.o theme.o theme_install.o thumbnail.o \
|
||||
treeview.o ucstables.o uri.o url_complete.o url_protocol.o \
|
||||
wimp.o wimp_event.o window.o # riscos/
|
||||
OBJECTS_RISCOS += con_cache.o con_connect.o con_content.o con_fonts.o \
|
||||
con_home.o con_image.o con_inter.o con_language.o con_memory.o \
|
||||
con_secure.o con_theme.o # riscos/configure/
|
||||
OBJECTS_RISCOS += progress_bar.o status_bar.o # riscos/gui/
|
||||
# OBJECTS_RISCOS += memdebug.o
|
||||
|
||||
OBJECTS_RISCOS_SMALL = $(OBJECTS_RISCOS)
|
||||
|
||||
OBJECTS_DEBUG = $(OBJECTS_COMMON) $(OBJECTS_IMAGE)
|
||||
OBJECTS_DEBUG += debug_bitmap.o filetyped.o fontd.o netsurfd.o # debug/
|
||||
|
||||
OBJECTS_DEBUGRO = $(OBJECTS_COMMON) $(OBJECTS_IMAGE)
|
||||
OBJECTS_DEBUGRO += netsurfd.o # debug/
|
||||
OBJECTS_DEBUGRO += artworks.o awrender.o bitmap.o draw.o \
|
||||
filename.o filetype.o font.o gif.o gifread.o image.o \
|
||||
jpeg.o palettes.o plotters.o save_complete.o schedule.o \
|
||||
sprite.o # riscos/
|
||||
|
||||
OBJECTS_GTK = $(OBJECTS_COMMON) $(OBJECTS_IMAGE)
|
||||
OBJECTS_GTK += browser.o frames.o history_core.o netsurf.o \
|
||||
selection.o textinput.o # desktop/
|
||||
OBJECTS_GTK += font_pango.o gtk_bitmap.o gtk_gui.o \
|
||||
gtk_schedule.o gtk_thumbnail.o gtk_options.o \
|
||||
gtk_plotters.o gtk_treeview.o gtk_scaffolding.o \
|
||||
gtk_completion.o gtk_login.o gtk_throbber.o \
|
||||
gtk_history.o gtk_window.o gtk_filetype.o \
|
||||
gtk_download.o # gtk/
|
||||
|
||||
# This makes me want to vomit, but is necessary to avoid a load of
|
||||
# "make: /home/riscos/cross/bin/gcc: Command not found." if there's no GCCSDK
|
||||
# installed on the build machine. The new build system can't happen soon enough
|
||||
OBJDIR_RISCOS = $(shell $(CC) -dumpmachine 2>/dev/null || echo arm-riscos-aof)
|
||||
SOURCES_RISCOS=$(OBJECTS_RISCOS:.o=.c)
|
||||
OBJS_RISCOS=$(OBJECTS_RISCOS:%.o=$(OBJDIR_RISCOS)/%.o)
|
||||
|
||||
OBJDIR_RISCOS_SMALL = $(OBJDIR_RISCOS)-small
|
||||
SOURCES_RISCOS_SMALL=$(OBJECTS_RISCOS_SMALL:.o=.c)
|
||||
OBJS_RISCOS_SMALL=$(OBJECTS_RISCOS_SMALL:%.o=$(OBJDIR_RISCOS_SMALL)/%.o)
|
||||
|
||||
OBJDIR_DEBUG = $(shell $(SYSTEM_CC) -dumpmachine)-debug
|
||||
SOURCES_DEBUG=$(OBJECTS_DEBUG:.o=.c)
|
||||
OBJS_DEBUG=$(OBJECTS_DEBUG:%.o=$(OBJDIR_DEBUG)/%.o)
|
||||
|
||||
OBJS_DEBUGRO=$(OBJECTS_DEBUGRO:%.o=$(OBJDIR_RISCOS)/%.o)
|
||||
|
||||
OBJDIR_GTK = objects-gtk
|
||||
SOURCES_GTK=$(OBJECTS_GTK:.o=.c)
|
||||
OBJS_GTK=$(OBJECTS_GTK:%.o=$(OBJDIR_GTK)/%.o)
|
||||
|
||||
# Default target - platform specific files may specify special-case rules for
|
||||
# various files.
|
||||
default: riscos
|
||||
|
||||
# Inclusion of platform specific files has to occur after the OBJDIR stuff as
|
||||
# that is referred to in the files
|
||||
|
||||
OS = $(word 2,$(subst -, ,$(shell $(SYSTEM_CC) -dumpmachine)))
|
||||
ifeq ($(OS),riscos)
|
||||
include riscos.mk
|
||||
else
|
||||
include posix.mk
|
||||
endif
|
||||
|
||||
VPATH = content:content/fetchers:css:desktop:image:render:riscos:riscos/configure:riscos/gui:utils:debug:gtk
|
||||
|
||||
WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
|
||||
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
|
||||
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
|
||||
-Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized
|
||||
|
||||
# CFLAGS have to appear after the inclusion of platform specific files as the
|
||||
# PLATFORM_CFLAGS variables are defined in them
|
||||
|
||||
CFLAGS_RISCOS = -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE -Driscos -DBOOL_DEFINED -O \
|
||||
$(WARNFLAGS) -I. $(PLATFORM_CFLAGS_RISCOS) -mpoke-function-name \
|
||||
# -include utils/memdebug.h
|
||||
CFLAGS_RISCOS_SMALL = $(CFLAGS_RISCOS) -Dsmall
|
||||
CFLAGS_DEBUG = -std=c99 -D_BSD_SOURCE -DDEBUG_BUILD $(WARNFLAGS) -I. \
|
||||
$(PLATFORM_CFLAGS_DEBUG) -g
|
||||
CFLAGS_GTK = -std=c99 -Dgtk -Dnsgtk \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
-D_BSD_SOURCE \
|
||||
-D_XOPEN_SOURCE=600 \
|
||||
-D_POSIX_C_SOURCE=200112L \
|
||||
$(WARNFLAGS) -I. -g -O \
|
||||
`pkg-config --cflags libglade-2.0 gtk+-2.0 librsvg-2.0` \
|
||||
`xml2-config --cflags`
|
||||
|
||||
# Stop GCC under Cygwin throwing a fit
|
||||
# If you pass -std=<whatever> it appears to define __STRICT_ANSI__
|
||||
# This causes use of functions such as vsnprintf to fail (as Cygwin's header
|
||||
# files surround declarations of such things with #ifndef __STRICT_ANSI__)
|
||||
ifneq ($(OS),riscos)
|
||||
ifeq ($(shell echo $$OS),Windows_NT)
|
||||
CFLAGS_GTK += -U__STRICT_ANSI__
|
||||
endif
|
||||
endif
|
||||
|
||||
AFLAGS_RISCOS = -xassembler-with-cpp $(PLATFORM_AFLAGS_RISCOS)
|
||||
AFLAGS_RISCOS_SMALL = $(AFLAGS_RISCOS) -Dsmall
|
||||
|
||||
# targets
|
||||
riscos: $(RUNIMAGE)
|
||||
$(RUNIMAGE) : $(OBJS_RISCOS)
|
||||
$(CC) -o $@ $(LDFLAGS_RISCOS) $^
|
||||
riscos_small: u!RunImage,ff8
|
||||
u!RunImage,ff8 : $(OBJS_RISCOS_SMALL)
|
||||
$(CC) -o $@ $(LDFLAGS_SMALL) $^
|
||||
|
||||
debug: nsdebug
|
||||
nsdebug: $(OBJS_DEBUG)
|
||||
$(CC_DEBUG) -o $@ $(LDFLAGS_DEBUG) $^
|
||||
|
||||
riscos_debug: nsrodebug,ff8
|
||||
nsrodebug,ff8: $(OBJS_DEBUGRO)
|
||||
$(CC) -o $@ $(LDFLAGS_RISCOS) $^
|
||||
|
||||
gtk: nsgtk
|
||||
nsgtk: $(OBJS_GTK)
|
||||
$(SYSTEM_CC) -o nsgtk $^ `pkg-config --cflags --libs libglade-2.0 gtk+-2.0 gthread-2.0 gmodule-2.0 librsvg-2.0` \
|
||||
$(LDFLAGS_DEBUG)
|
||||
|
||||
netsurf.zip: $(RUNIMAGE)
|
||||
rm netsurf.zip; riscos-zip -9vr, netsurf.zip !NetSurf
|
||||
|
||||
# pattern rules for c source
|
||||
$(OBJDIR_RISCOS)/%.o : %.c
|
||||
@echo "==> $<"
|
||||
@$(CC) -o $@ -c $(CFLAGS_RISCOS) $<
|
||||
$(OBJDIR_RISCOS_SMALL)/%.o : %.c
|
||||
@echo "==> $<"
|
||||
@$(CC) -o $@ -c $(CFLAGS_RISCOS_SMALL) $<
|
||||
$(OBJDIR_DEBUG)/%.o : %.c
|
||||
@echo "==> $<"
|
||||
@$(CC_DEBUG) -o $@ -c $(CFLAGS_DEBUG) $<
|
||||
$(OBJDIR_GTK)/%.o : %.c
|
||||
@echo "==> $<"
|
||||
@$(SYSTEM_CC) -o $@ -c $(CFLAGS_GTK) $<
|
||||
|
||||
# pattern rules for asm source
|
||||
$(OBJDIR_RISCOS)/%.o : %.s
|
||||
@echo "==> $<"
|
||||
$(ASM) -o $@ -c $(AFLAGS_RISCOS) $<
|
||||
$(OBJDIR_RISCOS_SMALL)/%.o : %.s
|
||||
@echo "==> $<"
|
||||
$(ASM) -o $@ -c $(AFLAGS_RISCOS_SMALL) $<
|
||||
|
||||
# Generate dependencies.
|
||||
# To disable automatic regeneration of dependencies (eg. if perl is not
|
||||
# available), remove */*.[ch] from the line below.
|
||||
# Under RISC OS, you may require *Set UnixFS$sfix "", if perl gives
|
||||
# "No such file or directory" errors.
|
||||
depend: css/css_enum.c css/parser.c css/scanner.c utils/translit.c */*.[ch] */*/*.[ch]
|
||||
@echo "--> modified files $?"
|
||||
@echo "--> updating dependencies"
|
||||
@-mkdir -p $(OBJDIR_RISCOS) $(OBJDIR_RISCOS_SMALL) $(OBJDIR_DEBUG) $(OBJDIR_GTK)
|
||||
@perl scandeps $(OBJDIR_RISCOS) $(OBJDIR_RISCOS_SMALL) $(OBJDIR_DEBUG) $(OBJDIR_GTK) -- $^ > depend
|
||||
|
||||
include depend
|
53
posix.mk
53
posix.mk
|
@ -1,53 +0,0 @@
|
|||
GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
|
||||
GCCSDK_INSTALL_ENV ?= /home/riscos/env
|
||||
|
||||
CC_DEBUG = /usr/bin/gcc
|
||||
# The wildcard rule matches on 'gcc' (GCCSDK 3.4) or 'arm-unknown-riscos-gcc' (GCCSDK 4)
|
||||
CC = $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
|
||||
ASM = $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
|
||||
|
||||
# If it's blank, then no cross-compiler was found. Set it to something sane.
|
||||
ifeq ($(CC),)
|
||||
CC = $(GCCSDK_INSTALL_CROSSBIN)/gcc
|
||||
ASM = $(GCCSDK_INSTALL_CROSSBIN)/gcc
|
||||
endif
|
||||
|
||||
PLATFORM_CFLAGS_RISCOS = -I$(GCCSDK_INSTALL_ENV)/include \
|
||||
-I$(GCCSDK_INSTALL_ENV)/include/libxml2 \
|
||||
-I$(GCCSDK_INSTALL_ENV)/include/libmng \
|
||||
#-finstrument-functions
|
||||
PLATFORM_CFLAGS_DEBUG = -I/usr/include/libxml2 -I/riscos/src/OSLib \
|
||||
-I/riscos/include/libjpeg -D_POSIX_C_SOURCE=200112
|
||||
PLATFORM_AFLAGS_RISCOS = -I$(GCCSDK_INSTALL_ENV)/include
|
||||
|
||||
LDFLAGS_RISCOS = -L$(GCCSDK_INSTALL_ENV)/lib -lxml2 -lz -lcurl -lssl -lcrypto \
|
||||
-lcares -lmng -lOSLib32 -ljpeg -lrufl -lpencil #-lprof
|
||||
LDFLAGS_SMALL = -L$(GCCSDK_INSTALL_ENV)/lib -lxml2 -lz -lucurl \
|
||||
-lcares -lmng -lOSLib32 -ljpeg -lrufl -lpencil
|
||||
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -lmng \
|
||||
-ljpeg -llcms
|
||||
|
||||
# Hackery for Cygwin - it has no libdl, so remove it from LDFLAGS
|
||||
ifeq ($(shell echo $$OS),Windows_NT)
|
||||
LDFLAGS_DEBUG := $(subst -ldl,,$(LDFLAGS_DEBUG))
|
||||
endif
|
||||
|
||||
RUNIMAGE = !NetSurf/!RunImage,ff8
|
||||
|
||||
# special cases - in here, cos RISC OS can't cope :(
|
||||
css/css_enum.c css/css_enum.h: css/css_enums css/makeenum
|
||||
perl css/makeenum css/css_enum < css/css_enums
|
||||
css/parser.c css/parser.h: css/parser.y
|
||||
-cd css; lemon parser.y
|
||||
css/scanner.c: css/scanner.l
|
||||
cd css; re2c -s scanner.l > scanner.c
|
||||
utils/translit.c: transtab
|
||||
cd utils; perl tt2code < transtab > translit.c
|
||||
|
||||
# remove generated files - again, RISC OS fails it
|
||||
clean:
|
||||
-rm $(OBJDIR_RISCOS)/* $(OBJDIR_RISCOS_SMALL)/* \
|
||||
$(OBJDIR_DEBUG)/* $(OBJDIR_GTK)/* \
|
||||
css/css_enum.c css/css_enum.h \
|
||||
css/parser.c css/parser.h css/scanner.c \
|
||||
nsgtk
|
45
riscos.mk
45
riscos.mk
|
@ -1,45 +0,0 @@
|
|||
CC = gcc
|
||||
CC_DEBUG = gcc
|
||||
ASM = gcc
|
||||
|
||||
PLATFORM_CFLAGS_RISCOS = -mthrowback -INSLibs:include -IOSLib:
|
||||
PLATFORM_CFLAGS_DEBUG = -mthrowback -INSLibs:include -IOSLib:
|
||||
PLATFORM_AFLAGS_RISCOS = -mthrowback -IOSLib:
|
||||
|
||||
LDFLAGS_RISCOS = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \
|
||||
NSLibs:lib/libssl NSLibs:lib/libcrypto NSLibs:lib/libcares \
|
||||
NSLibs:lib/libmng NSLibs:lib/libjpeg NSLibs:lib/librufl NSLibs:lib/libpencil \
|
||||
OSLib:o.OSLib32
|
||||
LDFLAGS_SMALL = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \
|
||||
NSLibs:lib/libares NSLibs:lib/libmng \
|
||||
NSLibs:lib/libjpeg OSLib:o.oslib32
|
||||
|
||||
RUNIMAGE = !NetSurf/!RunImage
|
||||
|
||||
# special cases
|
||||
css/css_enum.c css/css_enum.h: css/css_enums css/makeenum
|
||||
perl css/makeenum css/css_enum < css/css_enums
|
||||
css/parser.c css/parser.h: css/parser.y
|
||||
@dir css
|
||||
-lemon parser.y
|
||||
@dir ^
|
||||
css/scanner.c: css/scanner.l
|
||||
@dir css
|
||||
re2c -s scanner.l > scanner.c
|
||||
@dir ^
|
||||
utils/translit.c: transtab
|
||||
@dir utils
|
||||
perl tt2code < transtab > translit.c
|
||||
@dir ^
|
||||
|
||||
# remove generated files
|
||||
clean:
|
||||
-wipe $(OBJDIR_RISCOS).* ~CFR~V
|
||||
-wipe $(OBJDIR_RISCOS_SMALL).* ~CFR~V
|
||||
-wipe $(OBJDIR_DEBUG).* ~CFR~V
|
||||
-wipe $(OBJDIR_GTK).* ~CFR~V
|
||||
-wipe css.c.css_enum ~CFR~V
|
||||
-wipe css.h.css_enum ~CFR~V
|
||||
-wipe css.c.parser ~CFR~V
|
||||
-wipe css.h.parser ~CFR~V
|
||||
-wipe css.c.scanner ~CFR~V
|
Loading…
Reference in New Issue