2003-06-30 16:44:03 +04:00
|
|
|
#
|
|
|
|
# This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
# Licensed under the GNU General Public License,
|
|
|
|
# http://www.opensource.org/licenses/gpl-license
|
|
|
|
#
|
2002-07-28 01:10:45 +04:00
|
|
|
|
2003-06-05 18:39:54 +04:00
|
|
|
CC = riscos-gcc
|
2003-06-21 17:18:00 +04:00
|
|
|
CC_DEBUG = gcc
|
|
|
|
OBJECTS_COMMON = cache.o content.o fetch.o fetchcache.o other.o \
|
2003-05-31 22:40:46 +04:00
|
|
|
css.o css_enum.o parser.o ruleset.o scanner.o \
|
|
|
|
box.o html.o layout.o textplain.o \
|
2003-06-21 17:18:00 +04:00
|
|
|
utils.o
|
|
|
|
OBJECTS = $(OBJECTS_COMMON) \
|
|
|
|
browser.o netsurf.o \
|
|
|
|
gif.o gui.o jpeg.o png.o theme.o plugin.o \
|
|
|
|
options.o filetype.o font.o
|
|
|
|
OBJECTS_DEBUG = $(OBJECTS_COMMON) \
|
|
|
|
netsurfd.o \
|
|
|
|
optionsd.o filetyped.o fontd.o
|
2003-06-05 18:39:54 +04:00
|
|
|
DOCUMENTS = Themes.html
|
2003-06-21 17:18:00 +04:00
|
|
|
VPATH = content:css:desktop:render:riscos:utils:debug
|
2003-05-31 22:40:46 +04:00
|
|
|
WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-qual \
|
|
|
|
-Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes \
|
|
|
|
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
|
2003-07-10 01:33:01 +04:00
|
|
|
-Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized
|
2003-07-15 02:57:45 +04:00
|
|
|
CFLAGS = -std=c9x -D_BSD_SOURCE -Driscos -DBOOL_DEFINED -O $(WARNFLAGS) -I.. -I/usr/local/riscoslibs/include \
|
2003-05-31 22:40:46 +04:00
|
|
|
-Dfd_set=long -mpoke-function-name
|
2003-07-15 02:57:45 +04:00
|
|
|
CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE -O $(WARNFLAGS) -I.. -I/usr/include/libxml2 \
|
2003-06-21 17:18:00 +04:00
|
|
|
-Dfd_set=long -g
|
2003-05-31 22:40:46 +04:00
|
|
|
LDFLAGS = \
|
2003-06-05 18:39:54 +04:00
|
|
|
/usr/local/riscoslibs/libungif/libungif.ro \
|
|
|
|
/usr/local/riscoslibs/libxml2/libxml2.ro \
|
|
|
|
/usr/local/riscoslibs/OSLib/OSLib32.ro \
|
|
|
|
/usr/local/riscoslibs/curl/libcurl.ro \
|
|
|
|
/usr/local/riscoslibs/libpng/libpng.ro \
|
2003-06-25 03:22:00 +04:00
|
|
|
/usr/local/riscoslibs/zlib/libz.ro \
|
2003-06-25 03:32:39 +04:00
|
|
|
/usr/local/riscoslibs/openssl/libssl.a \
|
|
|
|
/usr/local/riscoslibs/openssl/libcrypto.a
|
2003-06-21 17:18:00 +04:00
|
|
|
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl
|
2003-05-31 22:40:46 +04:00
|
|
|
|
|
|
|
OBJDIR = $(shell $(CC) -dumpmachine)
|
|
|
|
SOURCES=$(OBJECTS:.o=.c)
|
|
|
|
OBJS=$(OBJECTS:%.o=$(OBJDIR)/%.o)
|
2003-06-21 17:18:00 +04:00
|
|
|
OBJDIR_DEBUG = $(shell $(CC_DEBUG) -dumpmachine)
|
|
|
|
SOURCES_DEBUG=$(OBJECTS_DEBUG:.o=.c)
|
|
|
|
OBJS_DEBUG=$(OBJECTS_DEBUG:%.o=$(OBJDIR_DEBUG)/%.o)
|
2003-06-05 18:39:54 +04:00
|
|
|
DOCDIR = !NetSurf/Docs
|
|
|
|
DOCS=$(DOCUMENTS:%.html=$(DOCDIR)/%.html)
|
2003-05-31 22:40:46 +04:00
|
|
|
|
|
|
|
# targets
|
2003-06-05 18:39:54 +04:00
|
|
|
all: !NetSurf/!RunImage,ff8 $(DOCS)
|
|
|
|
!NetSurf/!RunImage,ff8 : $(OBJS)
|
2003-05-31 22:40:46 +04:00
|
|
|
$(CC) -o $@ $(LDFLAGS) $^
|
2003-06-05 18:39:54 +04:00
|
|
|
netsurf.zip: !NetSurf/!RunImage,ff8 $(DOCS)
|
2003-05-31 22:40:46 +04:00
|
|
|
rm netsurf.zip; riscos-zip -9vr, netsurf.zip !NetSurf
|
2003-02-09 15:58:15 +03:00
|
|
|
|
2003-06-21 17:18:00 +04:00
|
|
|
# debug targets
|
|
|
|
debug: netsurf
|
|
|
|
netsurf: $(OBJS_DEBUG)
|
|
|
|
$(CC_DEBUG) -o $@ $(LDFLAGS_DEBUG) $^
|
|
|
|
|
2003-05-31 22:40:46 +04:00
|
|
|
# pattern rule for c source
|
|
|
|
$(OBJDIR)/%.o : %.c
|
2003-06-21 17:18:00 +04:00
|
|
|
$(CC) -o $@ -c $(CFLAGS) $<
|
|
|
|
$(OBJDIR_DEBUG)/%.o : %.c
|
|
|
|
$(CC_DEBUG) -o $@ -c $(CFLAGS_DEBUG) $<
|
2003-02-09 15:58:15 +03:00
|
|
|
|
2003-05-31 22:40:46 +04:00
|
|
|
# special cases
|
2003-04-04 19:19:32 +04:00
|
|
|
css/css_enum.c css/css_enum.h: css/css_enums css/makeenum
|
2003-06-05 18:39:54 +04:00
|
|
|
cd ..; /usr/bin/perl netsurf/css/makeenum netsurf/css/css_enum < netsurf/css/css_enums
|
2003-04-06 22:09:34 +04:00
|
|
|
css/parser.c: css/parser.y
|
2003-06-05 18:39:54 +04:00
|
|
|
-cd css; lemon parser.y
|
2003-04-04 19:19:32 +04:00
|
|
|
css/scanner.c css/scanner.h: css/scanner.l
|
2003-06-05 18:39:54 +04:00
|
|
|
cd css; flex scanner.l
|
|
|
|
|
|
|
|
# create documentation
|
|
|
|
$(DOCDIR)/%.html: documentation/%.xml
|
|
|
|
# syntax: xsltproc [options] -o <output file> <XSL stylesheet> <input file>
|
|
|
|
# --nonet prevents connection to the web to find the stylesheet
|
|
|
|
xsltproc -o $@ http://www.movspclr.co.uk/dtd/100/prm-html.xsl $<
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2003-05-31 22:40:46 +04:00
|
|
|
# generate dependencies
|
2003-06-21 17:18:00 +04:00
|
|
|
depend : $(SOURCES) $(SOURCES_DEBUG)
|
|
|
|
-mkdir $(OBJDIR) $(OBJDIR_DEBUG)
|
2003-06-05 18:39:54 +04:00
|
|
|
$(CC) -MM -MG $(CFLAGS) $^ | sed 's|.*\.o:|$(OBJDIR)/&|g' > $@
|
2003-06-21 17:18:00 +04:00
|
|
|
$(CC_DEBUG) -MM -MG $(CFLAGS_DEBUG) $^ | sed 's|.*\.o:|$(OBJDIR_DEBUG)/&|g' >> $@
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2003-05-31 22:40:46 +04:00
|
|
|
# remove generated files
|
|
|
|
clean :
|
2003-06-21 17:18:00 +04:00
|
|
|
-rm $(OBJDIR)/* $(OBJDIR_DEBUG)/* depend css/css_enum.c css/css_enum.h \
|
2003-05-31 22:40:46 +04:00
|
|
|
css/parser.c css/parser.h css/scanner.c css/scanner.h
|
|
|
|
|
2003-06-05 18:39:54 +04:00
|
|
|
include depend
|
2002-10-12 17:05:16 +04:00
|
|
|
|