diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-11-18 16:15:56 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-11-18 16:15:56 +0000 |
commit | 257deb32c83dbdd989d2021cdbd5ad7dbb28386f (patch) | |
tree | 2a29e2222196f351e62e1316ddaeefcb405fbb1a /Makefile | |
download | libnsutils-257deb32c83dbdd989d2021cdbd5ad7dbb28386f.tar.gz libnsutils-257deb32c83dbdd989d2021cdbd5ad7dbb28386f.tar.bz2 |
Initial nsutils library with base64 implementation an tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e371558 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +# Component settings +COMPONENT := nsutils +COMPONENT_VERSION := 0.0.1 +# Default to a static library +COMPONENT_TYPE ?= lib-static + +# Setup the tooling +PREFIX ?= /opt/netsurf +NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem +include $(NSSHARED)/makefiles/Makefile.tools + +# Reevaluate when used, as BUILDDIR won't be defined yet +TESTRUNNER = test/runtest.sh $(BUILDDIR) $(EXEEXT) + +# Toolchain flags +WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ + -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ + -Wmissing-declarations -Wnested-externs +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 + +TESTCFLAGGS := -g -O2 +TESTLDFLAGS := -lm -l$(COMPONENT) $(TESTLDFLAGS) + +include $(NSBUILD)/Makefile.top + +# Extra installation rules +I := /include/nsutils +INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/nsutils/utils.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT) |