From ed348a5b04e223ac7ee1d4e1f4d582135d2eece8 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 25 Mar 2009 20:35:48 +0000 Subject: First cut at a port to the new buildsystem. DOMTS stuff currently disabled. svn path=/trunk/dom/; revision=6883 --- Makefile | 58 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 55332c5..e2aae21 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,38 @@ -# Toolchain definitions for building on the destination platform -export CC = gcc -export AR = ar -export LD = gcc - -export CP = cp -export RM = rm -export MKDIR = mkdir -export MV = mv -export ECHO = echo -export MAKE = make -export PERL = perl -export PKGCONFIG = pkg-config -export XSLT = xsltproc +# Component settings +COMPONENT := dom +# Default to a static library +COMPONENT_TYPE ?= lib-static + +# Setup the tooling +include build/makefiles/Makefile.tools + +TESTRUNNER := $(PERL) build/testtools/testrunner.pl # Toolchain flags -WARNFLAGS = -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \ +WARNFLAGS := -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -Werror -pedantic -export CFLAGS = -std=c99 -D_BSD_SOURCE -I$(TOP)/include/ $(WARNFLAGS) -export ARFLAGS = -cru -export LDFLAGS = -L$(TOP)/ +CFLAGS := $(CFLAGS) -std=c99 -D_BSD_SOURCE -I$(CURDIR)/include/ \ + -I$(CURDIR)/src $(WARNFLAGS) + +include build/makefiles/Makefile.top -export CPFLAGS = -export RMFLAGS = -export MKDIRFLAGS = -p -export MVFLAGS = -export ECHOFLAGS = -export MAKEFLAGS = -export PKGCONFIGFLAGS = -export XSLTFLAGS = +# Extra installation rules +I := include/dom +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/dom.h;$(I)/functypes.h -export EXEEXT = +I := include/dom/bootstrap +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/implpriv.h;$(I)/implregistry.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/init_fini.h +I := include/dom/core +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/attr.h;$(I)/characterdata.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/document.h;$(I)/document_type.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/element.h;$(I)/exceptions.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/implementation.h;$(I)/impllist.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/namednodemap.h;$(I)/node.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/nodelist.h;$(I)/string.h +INSTALL_ITEMS := $(INSTALL_ITEMS) /$(I):$(I)/text.h -include build/Makefile.common +INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in +INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(BUILDDIR)/lib$(COMPONENT)$(LIBEXT) -- cgit v1.2.3