From 4145d6bec052608b0b023cb85f2f7f9e51521482 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 31 Dec 2017 17:24:46 +1100 Subject: Update DMBS to the latest version. --- .../DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk | 50 ++++++++++++++++++++++ .../lib/TEMPLATE_LIB/include/template_lib.h | 24 +++++++++++ .../Template/lib/TEMPLATE_LIB/src/template_lib.c | 10 +++++ .../lib/TEMPLATE_LIB/src/template_lib_private.h | 14 ++++++ 4 files changed, 98 insertions(+) create mode 100644 LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk create mode 100644 LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/include/template_lib.h create mode 100644 LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib.c create mode 100644 LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib_private.h (limited to 'LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB') diff --git a/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk new file mode 100644 index 000000000..57037506f --- /dev/null +++ b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk @@ -0,0 +1,50 @@ +# +# DMBS Build System +# Released into the public domain. +# +# dean [at] fourwalledcubicle [dot] com +# www.fourwalledcubicle.com +# + +# Include Guard +ifeq ($(filter TEMPLATE_LIB, $(DMBS_BUILD_MODULES)),) + +# Sanity check user supplied DMBS path +ifndef DMBS_PATH +$(error Makefile DMBS_PATH option cannot be blank) +endif + +# Location of the current module +TEMPLATE_LIB_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) + +# Import the CORE module of DMBS +include $(DMBS_PATH)/core.mk + +# This module needs to be included before gcc.mk +ifneq ($(findstring GCC, $(DMBS_BUILD_MODULES)),) +$(error Include this module before gcc.mk) +endif + +# Help settings +DMBS_BUILD_MODULES += TEMPLATE_LIB +DMBS_BUILD_TARGETS += +DMBS_BUILD_MANDATORY_VARS += DMBS_PATH +DMBS_BUILD_OPTIONAL_VARS += +DMBS_BUILD_PROVIDED_VARS += TEMPLATE_LIB_SRC +DMBS_BUILD_PROVIDED_MACROS += + +# Sanity check user supplied values +$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR))) + +# TEMPLATE_LIB Library +TEMPLATE_LIB_SRC := $(TEMPLATE_LIB_MODULE_PATH)/src/template_lib.c + +# Compiler flags and sources +SRC += $(TEMPLATE_LIB_SRC) +CC_FLAGS += -DDMBS_MODULE_TEMPLATE_LIB +CC_FLAGS += -I$(TEMPLATE_LIB_MODULE_PATH)/include/ + +# Phony build targets for this module +.PHONY: $(DMBS_BUILD_TARGETS) + +endif diff --git a/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/include/template_lib.h b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/include/template_lib.h new file mode 100644 index 000000000..1baa6357e --- /dev/null +++ b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/include/template_lib.h @@ -0,0 +1,24 @@ +/* + DMBS Build System + Released into the public domain. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com + */ + +// Include Guard +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +// Software version +#define TEMPLATE_LIB_VERSION 100 + +#include +#include + +#ifdef __cplusplus +} +#endif diff --git a/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib.c b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib.c new file mode 100644 index 000000000..f7f6945c1 --- /dev/null +++ b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib.c @@ -0,0 +1,10 @@ +/* + DMBS Build System + Released into the public domain. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com + */ + +#include "template_lib.h" +#include "template_lib_private.h" diff --git a/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib_private.h b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib_private.h new file mode 100644 index 000000000..714cd3be8 --- /dev/null +++ b/LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/src/template_lib_private.h @@ -0,0 +1,14 @@ +/* + DMBS Build System + Released into the public domain. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com + */ + +// Include Guard +#pragma once + +#include +#include +#include -- cgit v1.2.3