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
|
|
|
|
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 \
|
2003-10-25 04:35:49 +04:00
|
|
|
box.o form.o html.o layout.o textplain.o \
|
2004-01-02 15:01:23 +03:00
|
|
|
messages.o utils.o translit.o pool.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 \
|
2003-11-13 01:22:45 +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 \
|
2003-10-01 03:30:36 +04:00
|
|
|
draw.o gif.o jpeg.o plugin.o png.o sprite.o \
|
2003-12-27 07:50:02 +03:00
|
|
|
about.o filetype.o font.o uri.o url.o history.o \
|
2004-02-26 03:44:42 +03:00
|
|
|
version.o save_draw.o save_complete.o thumbnail.o save.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 \
|
|
|
|
draw.o gif.o jpeg.o png.o sprite.o \
|
|
|
|
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 \
|
|
|
|
-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-10-31 18:18:36 +03:00
|
|
|
CFLAGS = -std=c9x -D_BSD_SOURCE -Driscos -DBOOL_DEFINED -O $(WARNFLAGS) -I.. \
|
|
|
|
-mpoke-function-name
|
|
|
|
CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE $(WARNFLAGS) -I.. -I/usr/include/libxml2 -g
|
2003-12-26 03:17:55 +03:00
|
|
|
LDFLAGS = -L/riscos/lib -lxml2 -lz -lcurl -lssl -lcrypto -lares -lanim -lpng \
|
2004-01-25 23:13:51 +03:00
|
|
|
-lifc -loslib -luri -ljpeg
|
2003-12-26 03:17:55 +03:00
|
|
|
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl -luri
|
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) $^
|
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
|
|
|
|