-#
-# This file is part of Libsvgtiny
-# Licensed under the MIT License,
-# http://opensource.org/licenses/mit-license.php
-# Copyright 2008 James Bursa <james@semichrome.net>
-#
-
-SOURCE = svgtiny.c svgtiny_gradient.c svgtiny_list.c colors.c
-HDRS = svgtiny.h svgtiny_internal.h
-
-CFLAGS = -std=c99 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
- -Wcast-align -Wwrite-strings -Wstrict-prototypes \
- -Wmissing-prototypes -Wmissing-declarations \
- -Wnested-externs -Winline -Wno-cast-align
-ARFLAGS = cr
-INSTALL = install
-
-ifeq ($(TARGET),riscos)
- GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
- GCCSDK_INSTALL_ENV ?= /home/riscos/env
- CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
- AR := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
- CFLAGS += -Driscos -mpoke-function-name -I$(GCCSDK_INSTALL_ENV)/include \
- -I$(GCCSDK_INSTALL_ENV)/include/libxml2
- LIBS = -L$(GCCSDK_INSTALL_ENV)/lib -lxml2 -lz
- ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
- EXEEXT := ,e1f
- SUBTARGET := -elf-
- else
- EXEEXT := ,ff8
- SUBTARGET := -aof-
- endif
- PREFIX = $(GCCSDK_INSTALL_ENV)
+# Component settings
+COMPONENT := svgtiny
+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 standard library headers create warnings
+ifneq ($(TARGET),beos)
+ WARNFLAGS := $(WARNFLAGS) -Werror
+endif
+CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99