summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-06-04 14:51:51 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-06-04 14:51:51 +0200
commitbdb3ee493c5b5ad03b7ce189011422a1c6798dd1 (patch)
tree0ce3576ba29c7f936f10c186acfd0da669b0285b /src/db/Makefile
parent09bdaed7100ac97392e152a488d21db016952213 (diff)
Starting to work on the DB implementation.
Diffstat (limited to 'src/db/Makefile')
-rw-r--r--src/db/Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/db/Makefile b/src/db/Makefile
new file mode 100644
index 0000000..d7b6eed
--- /dev/null
+++ b/src/db/Makefile
@@ -0,0 +1,63 @@
+################################################################################
+## CONFIG ######################################################################
+################################################################################
+MODULE_NAME ?= $ $(shell basename ${CURDIR})
+MODULE_PORT ?= 8002
+
+DIALYZER_PLT_FILE ?= tacticians-server.plt
+
+## Main Directories
+SRC_DIR ?= ${CURDIR}/src
+CONF_DIR ?= ${CURDIR}/conf
+
+#### Optional Dirs
+BIN_DIR ?= ${CURDIR}/ebin
+INCLUDE_DIR ?= ${CURDIR}/include
+
+## Binaries
+ERLC ?= erlc
+ERLC_OPTS ?=
+DIALYZER ?= dialyzer
+
+################################################################################
+## MAKEFILE MAGIC ##############################################################
+################################################################################
+OPTIONAL_DIRS = $(BIN_DIR) $(INCLUDE_DIR)
+
+################################################################################
+## SANITY CHECKS ###############################################################
+################################################################################
+DIALYZER_PLT_FILE ?= tacticians-server.plt
+
+## Main Directories
+SRC_DIR ?= src
+CONF_DIR ?= conf
+
+################################################################################
+## INCLUDES ####################################################################
+################################################################################
+main_target: all
+
+include ${CURDIR}/mk/debug.mk
+include ${CURDIR}/mk/erlang.mk
+include ${CURDIR}/mk/preprocessor.mk
+
+################################################################################
+## TARGET RULES ################################################################
+################################################################################
+all: build
+
+debug: debug_run
+
+build: $(REQUIRED_HEADERS) $(PREPROCESSOR_RESULT) $(ERLANG_RESULT)
+
+run:
+
+clean:
+ rm -rf $(PREPROCESSOR_RESULT) $(ERLANG_RESULT)
+
+################################################################################
+## INTERNAL RULES ##############################################################
+################################################################################
+$(OPTIONAL_DIRS): %:
+ mkdir -p $@