source: appstream-generator/contrib/subprojects/mustache-d-0.1.3/posix.mak @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 744 bytes
Line 
1# build mode: 32bit or 64bit
2
3MODEL ?= $(shell getconf LONG_BIT)
4DMD ?= dmd
5
6LIB    = libmustache.a
7DFLAGS = -Isrc -m$(MODEL) -w -d #-property
8
9ifeq ($(BUILD),debug)
10        DFLAGS += -g -debug
11else
12        DFLAGS += -O -release -nofloat -inline -noboundscheck
13endif
14
15NAMES = mustache
16FILES = $(addsuffix .d, $(NAMES))
17SRCS  = $(addprefix src/, $(FILES))
18
19# DDoc
20DOCS      = $(addsuffix .html, $(NAMES))
21DDOCFLAGS = -Dd. -c -o- std.ddoc -Isrc
22
23target: $(LIB)
24
25$(LIB):
26        $(DMD) $(DFLAGS) -lib -of$(LIB) $(SRCS)
27
28doc:
29        $(DMD) $(DDOCFLAGS) $(SRCS)
30
31clean:
32        rm $(DOCS) $(LIB)
33
34MAIN_FILE = "empty_mustache_unittest.d"
35
36unittest:
37        echo 'import mustache; void main(){}' > $(MAIN_FILE)
38        $(DMD) $(DFLAGS) -unittest -of$(LIB) $(SRCS) -run $(MAIN_FILE)
39        rm $(MAIN_FILE)
Note: See TracBrowser for help on using the repository browser.