Add short delays before detaching from the USB bus in the bootloaders (thanks to...
[pub/USBasp.git] / LUFA / Build / DMBS / Template / lib / TEMPLATE_LIB / TEMPLATE_LIB.mk
1 #
2 # DMBS Build System
3 # Released into the public domain.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.fourwalledcubicle.com
7 #
8
9 # Include Guard
10 ifeq ($(filter TEMPLATE_LIB, $(DMBS_BUILD_MODULES)),)
11
12 # Sanity check user supplied DMBS path
13 ifndef DMBS_PATH
14 $(error Makefile DMBS_PATH option cannot be blank)
15 endif
16
17 # Location of the current module
18 TEMPLATE_LIB_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
19
20 # Import the CORE module of DMBS
21 include $(DMBS_PATH)/core.mk
22
23 # This module needs to be included before gcc.mk
24 ifneq ($(findstring GCC, $(DMBS_BUILD_MODULES)),)
25 $(error Include this module before gcc.mk)
26 endif
27
28 # Help settings
29 DMBS_BUILD_MODULES += TEMPLATE_LIB
30 DMBS_BUILD_TARGETS +=
31 DMBS_BUILD_MANDATORY_VARS += DMBS_PATH
32 DMBS_BUILD_OPTIONAL_VARS +=
33 DMBS_BUILD_PROVIDED_VARS += TEMPLATE_LIB_SRC
34 DMBS_BUILD_PROVIDED_MACROS +=
35
36 # Sanity check user supplied values
37 $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
38
39 # TEMPLATE_LIB Library
40 TEMPLATE_LIB_SRC := $(TEMPLATE_LIB_MODULE_PATH)/src/template_lib.c
41
42 # Compiler flags and sources
43 SRC += $(TEMPLATE_LIB_SRC)
44 CC_FLAGS += -DDMBS_MODULE_TEMPLATE_LIB
45 CC_FLAGS += -I$(TEMPLATE_LIB_MODULE_PATH)/include/
46
47 # Phony build targets for this module
48 .PHONY: $(DMBS_BUILD_TARGETS)
49
50 endif