aboutsummaryrefslogtreecommitdiffhomepage
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile117
1 files changed, 79 insertions, 38 deletions
diff --git a/makefile b/makefile
index f4225eb..949fa12 100644
--- a/makefile
+++ b/makefile
@@ -1,3 +1,4 @@
+PROJECT_VERSION :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`)
DMD=dmd
DMD_FLAGS=-de -w -J./views -I./src/sdp -linker=ld.gold
DMD_FLAGS_RELEASE=-O -inline -release
@@ -64,45 +65,85 @@ dub: $(PRG_SRCDIR)/$(PRG_SRC)
debug_dub: $(PRG_SRCDIR)/$(PRG_SRC)
$(DUB) $(DUB_FLAGS)$(DC) $(DUB_FLAGS_DEBUG)
# dmd
-dub_dmd_release: expunge skel tangle
- $(DUB) --config=sdp-release
-dub_dmd_release_stamp: clean_src skel tangle
- $(DUB) --config=sdp-dmd
-dub_dmd_test_release: tangle
- $(DUB) --config=sdp-dmd
-dub_dmd_debug: tangle
- $(DUB) --config=sdp-debug-dmd
-dub_dmd_debug_unittest: tangle
- $(DUB) --config=sdp-debug-unittest-dmd
-dub_dmd_debug_docs: clean_docs tangle
- $(DUB) --config=sdp-debug-docs-dmd
-dub_dmd_debug_clean: tangle
- $(DUB) --config=sdp-debug-clean
-dub_dmd_tmp: tangle
- $(DUB) --config=sdp-tmp
-dub_dmd_debug_src:
- $(DUB) --config=sdp-debug
+dmd_release: expunge skel tangle
+ $(DUB) --compiler=dmd --config=sdp-release
+dmd_release_stamp:
+ $(DUB) --compiler=dmd --config=sdp-dmd
+dmd_release_stamp_version:
+ $(DUB) --compiler=dmd --config=sdp-dmd
+ mv bin/sdp-dmd bin/sdp-dmd-$(PROJECT_VERSION)
+dmd_release_tangle: tangle
+ $(DUB) --compiler=dmd --config=sdp-dmd
+dmd_release_expunge_tangle: expunge skel tangle
+ $(DUB) --compiler=dmd --config=sdp-dmd
+dmd_debug:
+ $(DUB) --compiler=dmd --config=sdp-dmd-debug
+dmd_debug_tangle: tangle
+ $(DUB) --compiler=dmd --config=sdp-dmd-debug
+dmd_debug_docs: clean_docs tangle
+ $(DUB) --compiler=dmd --config=sdp-dmd-debug-docs
+dmd_debug_unittest: tangle
+ $(DUB) --compiler=dmd --config=sdp-dmd-debug-unittest
+dmd_debug_clean: tangle
+ $(DUB) --compiler=dmd --config=sdp-debug-clean
+dmd_tmp: tangle
+ $(DUB) --compiler=dmd --config=sdp-tmp
+dmd_debug_src:
+ $(DUB) --compiler=dmd --config=sdp-debug
+# gdc
+gdc_release: expunge skel tangle
+ $(DUB) --compiler=gdc --config=sdp-release
+gdc_release_stamp:
+ $(DUB) --compiler=gdc --config=sdp-gdc
+gdc_release_stamp_version:
+ $(DUB) --compiler=gdc --config=sdp-gdc
+ mv bin/sdp-gdc bin/sdp-gdc-$(PROJECT_VERSION)
+gdc_release_tangle: tangle
+ $(DUB) --compiler=gdc --config=sdp-gdc
+gdc_release_expunge_tangle: expunge skel tangle
+ $(DUB) --compiler=gdc --config=sdp-gdc
+gdc_debug:
+ $(DUB) --compiler=gdc --config=sdp-gdc-debug
+gdc_debug_tangle: tangle
+ $(DUB) --compiler=gdc --config=sdp-gdc-debug
+gdc_debug_docs: clean_docs tangle
+ $(DUB) --compiler=gdc --config=sdp-gdc-debug-docs
+gdc_debug_unittest: tangle
+ $(DUB) --compiler=gdc --config=sdp-gdc-debug-unittest
+gdc_debug_clean: tangle
+ $(DUB) --compiler=gdc --config=sdp-debug-clean
+gdc_tmp: tangle
+ $(DUB) --compiler=gdc --config=sdp-tmp
+gdc_debug_src:
+ $(DUB) --compiler=gdc --config=sdp-debug
# ldc2
-dub_ldc_release: expunge skel tangle
- $(DUB) --config=sdp-release
-dub_ldc_release_stamp: clean_src skel tangle
- $(DUB) --config=sdp-ldc
-dub_ldc_test_release: tangle
- $(DUB) --config=sdp-ldc
-dub_ldc_debug: tangle
- $(DUB) --config=sdp-debug-ldc
-dub_ldc_debug_unittest: tangle
- $(DUB) --config=sdp-debug-unittest-ldc
-dub_ldc_debug_docs: clean_docs tangle
- $(DUB) --config=sdp-debug-docs-ldc
-dub_ldc_debug_clean: tangle
- $(DUB) --config=sdp-debug-clean
-dub_ldc_tmp: tangle
- $(DUB) --config=sdp-tmp
-dub_ldc_debug_src:
- $(DUB) --config=sdp-debug
-dub_release_test_dmd: tangle dub_dmd_release_test
-dub_release_test_ldc: tangle dub_ldc_release_test
+ldc_release: expunge skel tangle
+ $(DUB) --compiler=ldc2 --config=sdp-release
+ldc_release_stamp:
+ $(DUB) --compiler=ldc2 --config=sdp-ldc
+ldc_release_stamp_version:
+ $(DUB) --compiler=ldc2 --config=sdp-ldc
+ mv bin/sdp-ldc bin/sdp-ldc-$(PROJECT_VERSION)
+ldc_release_tangle: tangle
+ $(DUB) --compiler=ldc2 --config=sdp-ldc
+ldc_release_expunge_tangle: expunge skel tangle
+ $(DUB) --compiler=ldc2 --config=sdp-ldc
+ldc_debug:
+ $(DUB) --compiler=ldc2 --config=sdp-ldc-debug
+ldc_debug_tangle: tangle
+ $(DUB) --compiler=ldc2 --config=sdp-ldc-debug
+ldc_debug_docs: clean_docs tangle
+ $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-docs
+ldc_debug_unittest: tangle
+ $(DUB) --compiler=ldc2 --config=sdp-ldc-debug-unittest
+ldc_debug_clean: tangle
+ $(DUB) --compiler=ldc2 --config=sdp-debug-clean
+ldc_tmp: tangle
+ $(DUB) --compiler=ldc2 --config=sdp-tmp
+ldc_debug_src:
+ $(DUB) --compiler=ldc2 --config=sdp-debug
+dmd_release_test: tangle dmd_test_release
+ldc_release_test: tangle ldc_test_release
rdmd: $(PRG_SRCDIR)/$(PRG_SRC)
$(RDMD) $(RDMD_FLAGS)$(DC) $(DC_FLAGS) \
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \