From 257deb32c83dbdd989d2021cdbd5ad7dbb28386f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 18 Nov 2014 16:15:56 +0000 Subject: Initial nsutils library with base64 implementation an tests --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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) -- cgit v1.2.3