-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
60 lines (42 loc) · 1.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Gnu make Makefile for libtcod-d
DMD = dmd
ifeq "" '$(COMSPEC)'
Platform := Unix
E := @echo
else ifneq "" '$(SHLVL)'
Platform := Msys
E := @echo
else
Platform := Windows
# Note trailing '.'
E := @echo.
endif
ifeq "" '$(MAKECMDGOALS)'
define message
Do not run make!
The makefile in this directory is used to generate the source code, NOT to
build anything needed to use the library. The archived version should include
the generated source code, so you should only need to start using the library.
Run 'make gen' if you're working on libtcod-d. If you're trying to USE
libtcod-d, see the examples/ directory for a sample Makefile
endef
$(error $(message))
endif
# For now, 32 bit is the default model
# PS: copied from phobos
ifeq (,$(MODEL))
MODEL:=32
endif
functions.d_gen := source/tcod/c/functions.d
generated_sources := $(functions.d_gen)
.PHONY: gen
gen: $(generated_sources) ;
genfuncs.d := source/genfunctionsmod.d
function_list.txt := source/functionlist.txt
$(functions.d_gen) : $(genfuncs.d) $(function_list.txt)
$(DMD) -m$(MODEL) -run $(genfuncs.d) \
< $(function_list.txt) \
> $@
.PHONY: clean
clean ::
rm $(generated_sources)