3 # Makefile for libsvgtiny
5 # Copyright 2009-2015 John-Mark Bell <jmb@netsurf-browser.org>
9 COMPONENT_VERSION := 0.1.7
10 # Default to a static library
11 COMPONENT_TYPE ?= lib-static
14 PREFIX ?= /opt/netsurf
15 NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
16 include $(NSSHARED)/makefiles/Makefile.tools
18 # Reevaluate when used, as BUILDDIR won't be defined yet
19 TESTRUNNER = test/runtest.sh $(BUILDDIR) $(EXEEXT)
22 WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
23 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
24 -Wmissing-declarations -Wnested-externs -pedantic
25 # BeOS/Haiku/AmigaOS standard library headers create warnings
26 ifneq ($(BUILD),i586-pc-haiku)
27 ifneq ($(findstring amigaos,$(BUILD)),amigaos)
28 WARNFLAGS := $(WARNFLAGS) -Werror
32 CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE \
33 -I$(CURDIR)/include/ -I$(CURDIR)/src \
34 $(WARNFLAGS) $(CFLAGS)
36 CFLAGS := $(CFLAGS) -std=c99
38 # __inline__ is a GCCism
39 CFLAGS := $(CFLAGS) -Dinline="__inline__"
45 $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags libdom libwapcaplet)
46 LDFLAGS := $(LDFLAGS) -lm \
47 $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --libs libdom libwapcaplet)
49 CFLAGS := $(CFLAGS) -I$(PREFIX)/include
50 LDFLAGS := $(CFLAGS) -ldom -lwapcaplet -lexpat -lm
53 include $(NSBUILD)/Makefile.top
55 # Extra installation rules
57 INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/svgtiny.h
58 INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in
59 INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT)