summaryrefslogtreecommitdiff
path: root/Makefile.defaults
blob: eda59beacda769cbeec122bc67bd613783065732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
#
# NetSurf default build setup
#
#
# | WARNING: You should NOT be editing this file.
# |
# |          If you want to configure your build, create a 'Makefile.config'
# |          file with 'override' statements to override the settings here.
# |          Follow the example in 'Makefile.config.example'.
#
#
# This file should be treated as INVIOLATE and only altered to alter
# the defaults by a core developer. If you wish to configure the build
# of NetSurf then instead please create a file called Makefile.config
# and simply override the statements you require in that.  Remember
# that Makefile.config cannot override the TARGET. That must be set on
# the commandline. i.e. 'make TARGET=framebuffer' However
# Makefile.config can use the TARGET variable to control what to set
# the configuration options to.
#
# Some of these options support an 'AUTO' option, as well as YES and NO.
# When an option is set to AUTO, the Makefile will attempt to detect if that
# feature is available, enabling it if possible.
#
# Options marked "highly recommended" have a severe impact on NetSurf's
# use as a web browser and should be set to YES unless there is a particularly
# good reason not to.
#

# ----------------------------------------------------------------------------
# Options relating to all versions of NetSurf
# ----------------------------------------------------------------------------

# Enable NetSurf's use of libnsbmp for displaying BMPs and ICOs
# Valid options: YES, NO
NETSURF_USE_BMP := YES

# Enable NetSurf's use of libnsgif for displaying GIFs
# Valid options: YES, NO				  (highly recommended)
NETSURF_USE_GIF := YES

# Enable NetSurf's use of libjpeg for displaying JPEGs
# Valid options: YES, NO				  (highly recommended)
NETSURF_USE_JPEG := YES

# Enable NetSurf's use of libpng for displaying PNGs.  If MNG and PNG
# are both enabled then NetSurf will choose libpng for PNGs, leaving
# MNGs and JNGs to libmng.
# Valid options: YES, NO	  (at least one of PNG/MNG highly recommended)
NETSURF_USE_PNG := YES

# Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
# Valid options: YES, NO	  (at least one of PNG/MNG highly recommended)
NETSURF_USE_MNG := YES

# Enable NetSurf's use of libwebp for displaying WebPs
# Valid options: YES, NO
NETSURF_USE_WEBP := NO

# Enable NetSurf's use of gstreamer for displaying videos
# Valid options: YES, NO
NETSURF_USE_VIDEO := NO

# Enable NetSurf's use of spidermonkey for javascript
# Valid options: YES, NO
NETSURF_USE_JS := NO

# Enable NetSurf's use of libharu for PDF export and GTK printing support.
# There is no auto-detection available for this, as it does not have a
# pkg-config file.
# Valid options: YES, NO
NETSURF_USE_HARU_PDF := NO

# Enable stripping the NetSurf binary
# Valid options: YES, NO
NETSURF_STRIP_BINARY := NO

# Template used for constructing the User Agent: string.  The first two
# replacements are major/minor version, second two are OS and architecture.
# Please don't be tempted to mention Mozilla here!  Let's let that lie die.
NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s; %s)"

# Default home page, if one is not defined by the user.  Note that this
# option does not apply to the RISC OS version, as it has its own local
# home page, and it can be changed by editing the end of gui_init2() in
# riscos/gui.c
NETSURF_HOMEPAGE := "http://www.netsurf-browser.org/welcome/"

# Force using glibc internal iconv implementation instead of external libiconv
# Valid options: YES, NO
NETSURF_USE_LIBICONV_PLUG := YES

# Initial CFLAGS. Optimisation level etc. tend to be target specific.
CFLAGS := 

# Default installation/execution prefix
PREFIX ?= /usr/local

# ----------------------------------------------------------------------------
# RISC OS-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),riscos)

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO
  NETSURF_USE_NSSVG := YES

  # Enable NetSurf's support for displaying RISC OS Draw files
  # Valid options: YES, NO
  NETSURF_USE_DRAW := YES

  # Enable NetSurf's support for displaying RISC OS Sprites
  # Valid options: YES, NO
  NETSURF_USE_SPRITE := YES

  # Enable NetSurf's use of AWRender for displaying ArtWorks files
  # Valid options: YES, NO
  NETSURF_USE_ARTWORKS := YES

  # Enable NetSurf's support for the Acorn plugin protocol
  # Valid options: YES, NO
  NETSURF_USE_PLUGINS := NO

  # Enable NetSurf's use of pencil for Drawfile export
  # Valid options: YES, NO
  NETSURF_USE_DRAW_EXPORT := YES

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

endif

# ----------------------------------------------------------------------------
# GTK-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),gtk)

  # Where to search for NetSurf's resources after looking in ~/.netsurf and
  # $NETSURFRES.  It must have a trailing /
  NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/

  # Where to install the netsurf binary
  NETSURF_GTK_BIN := $(PREFIX)/bin/

  # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_RSVG := AUTO

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_NSSVG := AUTO

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := AUTO

  # Configuration overrides for Mac OS X
  ifeq ($(HOST),macosx)
    NETSURF_USE_LIBICONV_PLUG := NO
    NETSURF_USE_HARU_PDF := NO
  endif

  # Set default GTK version to build for (2 or 3)
  NETSURF_GTK_MAJOR := 2

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

endif

# ----------------------------------------------------------------------------
# Monkey-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),monkey)
  # How did I get mixed up with this fucking monkey anyhow?
  NETSURF_MONKEY_RESOURCES := $(PREFIX)/share/netsurf/
  NETSURF_MONKEY_BIN := $(PREFIX)/bin/
  NETSURF_USE_RSVG := NO
  NETSURF_USE_NSSVG := NO
  NETSURF_USE_ROSPRITE := NO
  NETSURF_USE_HARU_PDF := NO
  NETSURF_USE_LIBICONV_PLUG := NO
  CFLAGS += -O2 -Wuninitialized
endif

# ----------------------------------------------------------------------------
# BeOS-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),beos)


  # Where to install the netsurf binary
  NETSURF_BEOS_BIN := /boot/apps/netsurf/

  # TODO:HAIKU -- not sure if ~/.netsurf applies in beos
  # Where to search for NetSurf's resources after looking in ~/.netsurf and
  # $NETSURFRES.  It must have a trailing /
  NETSURF_BEOS_RESOURCES := /boot/apps/netsurf/res/

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_NSSVG := YES

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := AUTO

  # Enable NetSurf's use of libharu for PDF export.
  # Valid options: YES, NO
  NETSURF_USE_HARU_PDF := NO

  # Force using glibc internal iconv implementation instead of external libiconv
  # Valid options: YES, NO
  NETSURF_USE_LIBICONV_PLUG := NO

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

endif

# ----------------------------------------------------------------------------
# Amiga-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),amiga)

  # Force using glibc internal iconv implementation instead of external libiconv
  # Valid options: YES, NO
  NETSURF_USE_LIBICONV_PLUG := YES

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := NO

  # Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
  # Valid options: YES, NO	  (at least one of PNG/MNG/DT highly recommended)
  NETSURF_USE_MNG := NO

  # Enable NetSurf's use of libwebp for displaying WebPs
  # Valid options: YES, NO
  NETSURF_USE_WEBP := NO

  # Enable NetSurf to display Amiga icons 
  # Valid options: YES, NO                 (recommended)
  NETSURF_USE_AMIGA_ICON := YES

  # Enable NetSurf's use of DataTypes for unknown filetypes
  # Valid options: YES, NO
  NETSURF_USE_AMIGA_DATATYPES := YES

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # (NB: Requires NETSURF_AMIGA_USE_CAIRO)
  # Valid options: YES, NO
  NETSURF_USE_NSSVG := YES

  # Enable NetSurf's use of libcairo for some plotter functions
  # This will also link NetSurf with shared objects, and
  # requires AmigaOS 4.1 or higher to run the resulting executable
  # Valid options: YES, NO
  NETSURF_AMIGA_USE_CAIRO := YES

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

endif

# ----------------------------------------------------------------------------
# Framebuffer-target-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),framebuffer)
  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

  # Framebuffer default surface provider.
  # Valid values are: x, sdl, linux, vnc, able, 
  NETSURF_FB_FRONTEND := sdl

  # Use libharu to enable PDF export and GTK printing support.
  # Valid options: YES, NO
  NETSURF_USE_HARU_PDF := NO

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := AUTO

  # Library to use for font plotting 
  # Valid options: internal, freetype
  NETSURF_FB_FONTLIB := internal

  # freetype compiled in font locations 
  NETSURF_FB_FONTPATH := /usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts

  NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
  NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
  NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
  NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := DejaVuSans-BoldOblique.ttf
  NETSURF_FB_FONT_SERIF := DejaVuSerif.ttf
  NETSURF_FB_FONT_SERIF_BOLD := DejaVuSerif-Bold.ttf
  NETSURF_FB_FONT_MONOSPACE := DejaVuSansMono.ttf
  NETSURF_FB_FONT_MONOSPACE_BOLD := DejaVuSansMono-Bold.ttf
  NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
  NETSURF_FB_FONT_FANTASY := Impact.ttf

  # Framebuffer frontends may have differing root paths for resources
  # As such, these specify the resource path and config path.
  NETSURF_FB_RESPATH_linux := $(PREFIX)/share/netsurf/
  NETSURF_FB_RESPATH_able := (tftpboot)/
  NETSURF_FB_RESPATH_dummy := ./
  NETSURF_FB_RESPATH_sdl := $(PREFIX)/share/netsurf/
  NETSURF_FB_RESPATH_x := $(PREFIX)/share/netsurf/
  NETSURF_FB_RESPATH_vnc := $(PREFIX)/share/netsurf/

  NETSURF_FRAMEBUFFER_RESOURCES = $(NETSURF_FB_RESPATH_$(NETSURF_FB_FRONTEND))
  NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/

endif

# ----------------------------------------------------------------------------
# windows-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),windows)

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := NO

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO
  NETSURF_USE_NSSVG := NO

  # Force using glibc internal iconv implementation instead of external libiconv
  # Valid options: YES, NO
  NETSURF_USE_LIBICONV_PLUG := NO

  # mng support does not currently build on windows
  NETSURF_USE_MNG := NO

  # no pdf support
  NETSURF_USE_HARU_PDF := NO

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized

endif

# ----------------------------------------------------------------------------
# Atari-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),atari)

  # Force using glibc internal iconv implementation instead of external libiconv
  # Valid options: YES, NO
  NETSURF_USE_LIBICONV_PLUG := NO

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := NO

  # Enable NetSurf's use of libwebp for displaying WebPs
  # Valid options: YES, NO
  NETSURF_USE_WEBP := NO

  # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_RSVG := AUTO

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_NSSVG := AUTO
  
  NETSURF_USE_MNG := NO

  NETSURF_ATARI_USE_FREETYPE := YES

  # Optimisation levels
  CFLAGS += -m68000 -O2 -Wuninitialized

  WARNFLAGS = -W -Wundef -Wpointer-arith \
		-Wcast-align -Wwrite-strings -Wstrict-prototypes \
		-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
		-Wnested-externs -Wl,-t

endif

# ----------------------------------------------------------------------------
# Cocoa-specific options
# ----------------------------------------------------------------------------
ifeq ($(TARGET),cocoa)

  # Force using glibc internal iconv implementation instead of external libiconv
  # Valid options: YES, NO
  NETSURF_USE_LIBICONV_PLUG := NO

  # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
  # Valid options: YES, NO, AUTO
  NETSURF_USE_ROSPRITE := NO

  # Enable NetSurf's use of libwebp for displaying WebPs
  # Valid options: YES, NO
  NETSURF_USE_WEBP := NO

  # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_RSVG := AUTO

  # Enable NetSurf's use of libsvgtiny for displaying SVGs
  # Valid options: YES, NO, AUTO
  NETSURF_USE_NSSVG := AUTO
  
  NETSURF_USE_MNG := NO
  NETSURF_USE_BMP := NO
  NETSURF_USE_GIF := NO
  NETSURF_USE_PNG := NO
  NETSURF_USE_JPEG := NO
  NETSURF_USE_IMAGEIO := YES

  DEVELOPER_PATH := /Developer
  MACOSX_VERSION := 10.5
  SDK_VERSION := $(MACOSX_VERSION)

  # Optimisation levels
  CFLAGS += -O2 -Wuninitialized 

endif

# Include any local configuration
ifneq ($(MAKEFILE_DEFAULTS_FINISHED),)
$(error Makefile.defaults has been double-included.  If you did something utterly brain-dead such as copying Makefile.defaults to Makefile.config then you deserve all the pain you can imagine.  Do NOT do that.  Why not read the comments at the top of Makefile.defaults.  They are there to help you, you numpty)
endif
MAKEFILE_DEFAULTS_FINISHED=yes
-include Makefile.config