summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hambley <lists@aether.demon.co.uk>2004-05-20 20:51:42 +0000
committerMatthew Hambley <lists@aether.demon.co.uk>2004-05-20 20:51:42 +0000
commitcf70d529bf077f7ef804eafc543ae21ee8b9d2a5 (patch)
treedfec9573c1cb0cafe9b2b3f4df8081a134818006
parent254c4d509ed6db8c52cd32b3d0a0cdeba7212b39 (diff)
downloadnetsurf-cf70d529bf077f7ef804eafc543ae21ee8b9d2a5.tar.gz
netsurf-cf70d529bf077f7ef804eafc543ae21ee8b9d2a5.tar.bz2
[project @ 2004-05-20 20:51:42 by matthewh]
First round of bug fixes for new build structure svn path=/import/netsurf/; revision=873
-rw-r--r--makefile45
-rw-r--r--posix.mk3
-rw-r--r--riscos.mk3
3 files changed, 32 insertions, 19 deletions
diff --git a/makefile b/makefile
index d89d08146..696164e53 100644
--- a/makefile
+++ b/makefile
@@ -4,13 +4,10 @@
# http://www.opensource.org/licenses/gpl-license
#
-OS = $(word 2,$(subst -, ,$(shell $(CC) -dumpmachine)))
+# The 'all' target is presented first so as not to screw up over targets included
+# in the platform specific files
-ifeq ($(OS),riscos)
-include riscos.mk
-else
-include posix.mk
-endif
+all: !NetSurf/!RunImage,ff8 $(DOCS)
OBJECTS_COMMON = cache.o content.o fetch.o fetchcache.o \
css.o css_enum.o parser.o ruleset.o scanner.o \
@@ -40,6 +37,25 @@ OBJECTS_DEBUGRO = $(OBJECTS_COMMON) \
version.o \
options.o font.o schedule.o
+OBJDIR = $(shell $(CC) -dumpmachine)
+SOURCES=$(OBJECTS:.o=.c)
+OBJS=$(OBJECTS:%.o=$(OBJDIR)/%.o)
+
+OBJDIR_DEBUG = $(shell $(CC_DEBUG) -dumpmachine)-debug
+SOURCES_DEBUG=$(OBJECTS_DEBUG:.o=.c)
+OBJS_DEBUG=$(OBJECTS_DEBUG:%.o=$(OBJDIR_DEBUG)/%.o)
+OBJS_DEBUGRO=$(OBJECTS_DEBUGRO:%.o=$(OBJDIR_DEBUG)/%.o)
+
+# Inclusion of platform specific files has to occur after the OBJDIR stuff as that
+# is refered to in the files
+
+OS = $(word 2,$(subst -, ,$(shell $(CC) -dumpmachine)))
+ifeq ($(OS),riscos)
+include riscos.mk
+else
+include posix.mk
+endif
+
VPATH = content:css:desktop:render:riscos:utils:debug
WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-qual \
@@ -47,23 +63,14 @@ WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-qual \
-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
+# PLTFORM_CFLAGS variables are defined in them
+
CFLAGS = -std=c9x -D_BSD_SOURCE -Driscos -DBOOL_DEFINED -O $(WARNFLAGS) -I.. \
$(PLATFORM_CFLAGS) -mpoke-function-name
-CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE -Driscos $(WARNFLAGS) -I.. $(PLATFORM_CFLAGS_DEBUG) -g
-
-OBJDIR = $(shell $(CC) -dumpmachine)
-SOURCES=$(OBJECTS:.o=.c)
-OBJS=$(OBJECTS:%.o=$(OBJDIR)/%.o)
-
-OBJDIR_DEBUG = $(shell $(CC_DEBUG) -dumpmachine)-debug
-SOURCES_DEBUG=$(OBJECTS_DEBUG:.o=.c)
-OBJS_DEBUG=$(OBJECTS_DEBUG:%.o=$(OBJDIR_DEBUG)/%.o)
-OBJS_DEBUGRO=$(OBJECTS_DEBUGRO:%.o=$(OBJDIR_DEBUG)/%.o)
+CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE $(WARNFLAGS) -I.. $(PLATFORM_CFLAGS_DEBUG) -g
# targets
-all: !NetSurf/!RunImage,ff8 $(DOCS)
-!NetSurf/!RunImage,ff8 : $(OBJS)
- $(CC) -o $@ $(LDFLAGS) $^
u!RunImage,ff8 : $(OBJS)
$(CC) -o $@ $(LDFLAGS_SMALL) $^
netsurf.zip: !NetSurf/!RunImage,ff8 $(DOCS)
diff --git a/posix.mk b/posix.mk
index ba89a877a..5c1c15a8f 100644
--- a/posix.mk
+++ b/posix.mk
@@ -9,4 +9,7 @@ LDFLAGS = -L/riscos/lib -lxml2 -lz -lcurl -lssl -lcrypto -lcares -lanim -lpng \
LDFLAGS_SMALL = -L/riscos/lib -lxml2 -lz -lucurl -lcares -lanim -lpng -loslib -ljpeg
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl -ljpeg
+!NetSurf/!RunImage,ff8 : $(OBJS)
+ $(CC) -o $@ $(LDFLAGS) $^
+
include depend
diff --git a/riscos.mk b/riscos.mk
index 2f635defa..903b18c0b 100644
--- a/riscos.mk
+++ b/riscos.mk
@@ -13,3 +13,6 @@ LDFLAGS_SMALL = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \
LDFLAGS_DEBUG = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \
NSLibs:lib/libssl NSLibs:lib/libcrypto NSLibs:lib/libares \
NSLibs:lib/libanim NSLibs:lib/libpng NSLibs:lib/libjpeg OSLib:o.oslib32
+
+!NetSurf/!RunImage,ff8 : $(OBJS)
+ $(CC) -o !NetSurf/!RunImage $(LDFLAGS) $^