192
|
1 # GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html
|
|
2 # Copyright (C) 2004 Thomas Kuehne
|
|
3 #
|
|
4 # This program is free software; you can redistribute it and/or modify
|
|
5 # it under the terms of the GNU General Public License as published by
|
|
6 # the Free Software Foundation; either version 2 of the License, or
|
|
7 # (at your option) any later version.
|
|
8 #
|
|
9 # This program is distributed in the hope that it will be useful,
|
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 # GNU General Public License for more details.
|
|
13 #
|
|
14 # You should have received a copy of the GNU General Public License
|
|
15 # along with this program; if not, write to the Free Software
|
|
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
17 #
|
|
18
|
|
19 #
|
|
20 # NOTE: almost all tests can be written using __DSTRESS_DFLAGS__
|
|
21 #
|
|
22
|
605
|
23 .PHONY:: \
|
192
|
24 complex/linking/warning \
|
|
25 complex/linking/$(complex_done) \
|
|
26 complex/linking/clean \
|
|
27 complex/linking/dest
|
|
28
|
|
29 complex/linking/warning :
|
|
30 @echo "don't invoke this file directly, instead use DStress' root Makefile with the target \"complex/linking/complex.done\", \"complex\" or \"all\""
|
|
31
|
|
32 complex/linking/dest = \
|
|
33 complex/linking/linking_01 \
|
|
34 complex/linking/linking_02
|
|
35
|
|
36 # the actual target, will be called by root's "all" / "complex" target
|
|
37 complex/linking/$(complex_done) : $(complex/linking/dest)
|
|
38
|
|
39 #
|
|
40 # compile all 3 files in 1 step -> link, execute
|
|
41 #
|
|
42 complex/linking/linking_01 : complex/linking/a.d complex/linking/b.d complex/linking/c.d
|
|
43 $(eval z_name = $@)
|
|
44 @$(RM) -f complex/linking/a.o complex/linking/b.o complex/linking/c.o
|
|
45 $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) -od$(OBJ_DIR) -of$@ complex/linking/a.d complex/linking/b.d complex/linking/c.d $(to_log)"))
|
|
46 $(analyse_run)
|
|
47
|
|
48 #
|
|
49 # compile 3 files in 3 steps -> link, execute
|
|
50 #
|
|
51 complex/linking/linking_02 : complex/linking/a.d complex/linking/b.d complex/linking/c.d
|
|
52 $(eval z_flags = -I.. )
|
|
53 @$(RM) -f complex/linking/a.o complex/linking/b.o complex/linking/c.o
|
|
54 $(eval z_name = $@_A)
|
|
55 $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -c -ofcomplex/linking/a.o complex/linking/a.d $(to_log)"))
|
|
56 $(analyse_compile)
|
|
57
|
|
58 $(eval z_name = $@_B)
|
|
59 $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -c -ofcomplex/linking/b.o complex/linking/b.d $(to_log)"))
|
|
60 $(analyse_compile)
|
|
61
|
|
62 $(eval z_name = $@_C)
|
|
63 $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -c -ofcomplex/linking/c.o complex/linking/c.d $(to_log)"))
|
|
64 $(analyse_compile)
|
|
65
|
|
66 $(eval z_name = $@)
|
|
67 $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) -of$@ complex/linking/a.o complex/linking/b.o complex/linking/c.o $(to_log)"))
|
|
68 $(analyse_run)
|
|
69
|
|
70 # this will be called by root's "clean" target
|
|
71 complex/linking/clean :
|
|
72 $(RM) complex/linking/*.done $(complex/linking/dest)
|
|
73
|