summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-01-06 16:32:59 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-01-06 16:32:59 +0000
commitf3a77d3c00c095a53f37aa7efb39d56168799596 (patch)
tree0bd2269afe0edd5018c5d231c95a5011002c83cf /Makefile
parent628079a91ca6d86a7915906d266e6fe5593bb846 (diff)
downloadlibrufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.gz
librufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.bz2
Port to core buildsystem.
The python module (and associated make runes) need some love (as does non-GCC building with the core buildsystem in general) svn path=/trunk/rufl/; revision=9792
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6928eb6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+# Component settings
+COMPONENT := rufl
+COMPONENT_VERSION := 0.0.1
+# Default to a static library
+COMPONENT_TYPE ?= lib-static
+
+# Setup the tooling
+include build/makefiles/Makefile.tools
+
+TESTRUNNER := $(ECHO)
+
+# Toolchain flags
+WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+# BeOS/Haiku/AmigaOS4 standard library headers create warnings
+ifneq ($(TARGET),beos)
+ ifneq ($(TARGET),AmigaOS)
+ WARNFLAGS := $(WARNFLAGS) -Werror
+ endif
+endif
+CFLAGS := -I$(CURDIR)/include/ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
+else
+ # __inline__ is a GCCism
+ CFLAGS := $(CFLAGS) -Dinline="__inline__"
+endif
+
+# OSLib
+ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
+ ifeq ($(TARGET),riscos)
+ CFLAGS := $(CFLAGS) -I$(PREFIX)/include
+ LDFLAGS := $(LDFLAGS) -lOSLib32
+ endif
+endif
+
+include build/makefiles/Makefile.top
+
+# Extra installation rules
+I := /include
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/rufl.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
+INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)