diff options
author | Drashna Jaelre <drashna@live.com> | 2019-07-03 07:54:39 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-03 07:54:49 -0700 |
commit | 110622eaa2787cc54818083d4243653b088e5b5a (patch) | |
tree | b1637e4dc8d8aa13e9face4998cf25ae620361e5 /LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk | |
parent | d0fd80affba97b37eb00c650e87cb5982a4f260e (diff) | |
parent | 5ba628d10b54d58d445896290ba9799bd76a73b3 (diff) | |
download | lufa-110622eaa2787cc54818083d4243653b088e5b5a.tar.gz lufa-110622eaa2787cc54818083d4243653b088e5b5a.tar.bz2 lufa-110622eaa2787cc54818083d4243653b088e5b5a.zip |
Merge remote-tracking branch 'abcminiuser/master'
Diffstat (limited to 'LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk')
-rw-r--r-- | LUFA/Build/DMBS/Template/lib/TEMPLATE_LIB/TEMPLATE_LIB.mk | 50 |
1 files changed, 50 insertions, 0 deletions
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 |