forked from abcminiuser/dmbs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53bccb3
commit 8a06517
Showing
5 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# DMBS Build System | ||
# Released into the public domain. | ||
# | ||
# dean [at] fourwalledcubicle [dot] com | ||
# www.fourwalledcubicle.com | ||
# | ||
|
||
# Include Guard | ||
ifeq ($(findstring 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 += -I$(TEMPLATE_LIB_MODULE_PATH)/include/ | ||
|
||
# Phony build targets for this module | ||
.PHONY: $(DMBS_BUILD_TARGETS) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <stdint.h> | ||
#include <stddef.h> | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <stdint.h> | ||
#include <stddef.h> | ||
#include <avr/io.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters