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-10-31 18:18:36 +03:00
|
|
|
CC = /riscos/bin/gcc
|
2003-06-21 17:18:00 +04:00
|
|
|
CC_DEBUG = gcc
|
2004-03-11 05:19:14 +03:00
|
|
|
OBJECTS_COMMON = cache.o content.o fetch.o fetchcache.o \
|
2003-05-31 22:40:46 +04:00
|
|
|
css.o css_enum.o parser.o ruleset.o scanner.o \
|
2003-10-25 04:35:49 +04:00
|
|
|
box.o form.o html.o layout.o textplain.o \
|
2004-03-27 03:54:03 +03:00
|
|
|
messages.o utils.o translit.o pool.o url.o imagemap.o \
|
2004-03-27 21:47:21 +03:00
|
|
|
jpeg.o save_complete.o
|
2003-06-21 17:18:00 +04:00
|
|
|
OBJECTS = $(OBJECTS_COMMON) \
|
2004-02-13 19:09:12 +03:00
|
|
|
browser.o loginlist.o netsurf.o options.o \
|
2004-03-27 03:54:03 +03:00
|
|
|
htmlinstance.o htmlredraw.o \
|
2003-12-27 01:12:39 +03:00
|
|
|
401login.o constdata.o dialog.o download.o frames.o gui.o \
|
2003-11-13 01:22:45 +03:00
|
|
|
menus.o mouseactions.o \
|
2004-02-13 19:09:12 +03:00
|
|
|
textselection.o theme.o window.o \
|
2004-03-27 03:54:03 +03:00
|
|
|
draw.o gif.o plugin.o png.o sprite.o \
|
2004-03-02 21:02:41 +03:00
|
|
|
about.o filetype.o font.o uri.o url_protocol.o history.o \
|
2004-03-06 15:34:47 +03:00
|
|
|
version.o thumbnail.o \
|
2004-03-27 21:47:21 +03:00
|
|
|
save.o save_draw.o save_text.o schedule.o
|
2003-06-21 17:18:00 +04:00
|
|
|
OBJECTS_DEBUG = $(OBJECTS_COMMON) \
|
|
|
|
netsurfd.o \
|
2004-02-13 19:09:12 +03:00
|
|
|
options.o filetyped.o fontd.o
|
2004-01-02 15:01:23 +03:00
|
|
|
OBJECTS_DEBUGRO = $(OBJECTS_COMMON) \
|
|
|
|
netsurfd.o \
|
|
|
|
constdata.o \
|
|
|
|
theme.o \
|
2004-03-27 03:54:03 +03:00
|
|
|
draw.o gif.o png.o sprite.o \
|
2004-01-02 15:01:23 +03:00
|
|
|
about.o filetype.o \
|
|
|
|
version.o \
|
2004-02-13 19:09:12 +03:00
|
|
|
options.o font.o
|
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 \
|
2004-02-26 20:22:41 +03:00
|
|
|
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
|
2003-05-31 22:40:46 +04:00
|
|
|
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
|
2003-07-10 01:33:01 +04:00
|
|
|
-Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized
|
2003-10-31 18:18:36 +03:00
|
|
|
CFLAGS = -std=c9x -D_BSD_SOURCE -Driscos -DBOOL_DEFINED -O $(WARNFLAGS) -I.. \
|
|
|
|
-mpoke-function-name
|
2004-03-27 03:54:03 +03:00
|
|
|
CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE $(WARNFLAGS) -I.. -I/usr/include/libxml2 -g \
|
|
|
|
-I/riscos/include
|
2003-12-26 03:17:55 +03:00
|
|
|
LDFLAGS = -L/riscos/lib -lxml2 -lz -lcurl -lssl -lcrypto -lares -lanim -lpng \
|
2004-03-19 19:31:03 +03:00
|
|
|
-loslib -ljpeg
|
|
|
|
LDFLAGS_SMALL = -L/riscos/lib -lxml2 -lz -lucurl -lares -lanim -lpng -loslib -ljpeg
|
2004-03-27 03:54:03 +03:00
|
|
|
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl -ljpeg
|
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)
|
2004-01-02 15:01:23 +03:00
|
|
|
OBJS_DEBUGRO=$(OBJECTS_DEBUGRO:%.o=$(OBJDIR)/%.o)
|
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) $^
|
2004-03-19 19:31:03 +03:00
|
|
|
u!RunImage,ff8 : $(OBJS)
|
|
|
|
$(CC) -o $@ $(LDFLAGS_SMALL) $^
|
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) $^
|
2004-01-02 15:01:23 +03:00
|
|
|
debugro: nsdebug,ff8
|
|
|
|
nsdebug,ff8: $(OBJS_DEBUGRO)
|
|
|
|
$(CC) -o $@ $(LDFLAGS) $^
|
2003-06-21 17:18:00 +04:00
|
|
|
|
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
|
2003-12-29 03:38:59 +03:00
|
|
|
utils/translit.c: transtab
|
|
|
|
cd utils; ./tt2code < transtab > translit.c
|
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
|
|
|
|