From 143379df9873622ffe938592cd27e89a95361ddf Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 11 Oct 2012 19:13:35 +0200 Subject: digital/ucoolib: add ucoolib build system and basic arch module --- digital/ucoolib/build/top.mk | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 digital/ucoolib/build/top.mk (limited to 'digital/ucoolib/build/top.mk') diff --git a/digital/ucoolib/build/top.mk b/digital/ucoolib/build/top.mk new file mode 100644 index 00000000..29e8003f --- /dev/null +++ b/digital/ucoolib/build/top.mk @@ -0,0 +1,58 @@ +# ucoolib - Microcontroller object oriented library. +# +# Build system top file. To be included with $(BASE) pointing to the ucoolib +# root. + +ifeq ($(BASE),) +$(error BASE is not defined) +endif + +include $(BASE)/build/macros.mk + +# General parameters. + +OBJDIR := obj + +INCLUDES := $(INCLUDES) -I$(BASE) -I$(OBJDIR) +CPPFLAGS := $(DEFS) $(INCLUDES) -MP -MMD +OPTIMIZE ?= -Os +CFLAGS := -g -Wall -W -Wundef -Wno-unused-parameter \ + -fno-exceptions $(OPTIMIZE) +CXXFLAGS := $(CFLAGS) -fno-rtti -fno-threadsafe-statics -fno-implicit-templates +LDFLAGS := +LDLIBS := $(LIBS) + +# Quiet, unset to see executed lines. +Q = @ + +# Main rules. + +all: +lst: +size: + +clean: + rmdir $(OBJDIR) 2> /dev/null || true + +.PHONY: all lst size clean + +# Modules and sources setup. + +include $(BASE)/build/setup.mk + +vpath %.cc $(ALL_MODULES:%=$(BASE)/ucoolib/%) +vpath %.c $(ALL_MODULES:%=$(BASE)/ucoolib/%) +vpath %.S $(ALL_MODULES:%=$(BASE)/ucoolib/%) + +# Objects directory. + +$(OBJDIR): + $Qmkdir -p $(OBJDIR) + +# Arch specific. + +include $(BASE)/build/arch.mk +define TARGETS_template +include $$(BASE)/build/$1.mk +endef +$(foreach target,$(TARGETS),$(eval $(call TARGETS_template,$(target)))) -- cgit v1.2.3