Mercurial > projects > dstress
annotate Makefile.parallel @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | 44b8263c91ea |
children |
rev | line source |
---|---|
903 | 1 # $HeadURL$ |
2 # $Date$ | |
3 # $Author$ | |
4 # | |
5 # experimental parallel GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html | |
1411 | 6 # Copyright (C) 2006, 2007 Thomas Kuehne |
903 | 7 # |
8 # This program is free software; you can redistribute it and/or modify | |
9 # it under the terms of the GNU General Public License as published by | |
10 # the Free Software Foundation; either version 2 of the License, or | |
11 # (at your option) any later version. | |
12 # | |
13 # This program is distributed in the hope that it will be useful, | |
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 # GNU General Public License for more details. | |
17 # | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with this program; if not, write to the Free Software | |
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 # | |
22 | |
23 # | |
24 # config | |
25 # | |
26 | |
905 | 27 date := date +"%a, %e %b %Y %T %z" |
28 uname := uname -s -m -r | |
903 | 29 |
30 ifndef CAT | |
31 CAT := cat | |
32 endif | |
33 | |
34 ifndef CC | |
35 CC := cc | |
36 endif | |
37 | |
38 ifndef DMD | |
39 DMD := dmd | |
40 export DMD | |
41 endif | |
42 | |
43 ifndef FIND | |
44 FIND := find | |
45 endif | |
46 | |
47 ifndef RM | |
1411 | 48 RM := rm -rf -- |
903 | 49 endif |
50 | |
905 | 51 find := find |
910 | 52 find_filter := -type f | grep -v "\\(\\.svn\\)\\|\\(\\.exe$$\\)" |
905 | 53 |
903 | 54 ############################################################################### |
55 ############################################################################### | |
56 # | |
57 # nothing to customize below this line | |
58 # | |
59 ############################################################################### | |
60 ############################################################################### | |
61 | |
905 | 62 ifndef NO_TORTURE |
63 torture := torture- | |
64 else | |
65 torture := | |
66 endif | |
67 | |
913 | 68 dstress := ./dstress |
69 crashRun := ./crashRun | |
903 | 70 logsuffix := .outlog |
71 | |
913 | 72 .PHONY:: all clean compile nocompile norun run tools version |
903 | 73 |
913 | 74 all :: version compile nocompile run norun |
903 | 75 |
913 | 76 % : %.c |
969 | 77 $(CC) $(CFLAGS) -DUSE_VALGRIND $< -o $@ |
903 | 78 |
936
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
79 tools :: $(dstress) $(crashRun) |
903 | 80 |
81 version : | |
82 @$(date) | |
83 @$(uname) | |
84 -@$(DMD) -v | |
85 | |
86 # | |
87 # compile | |
88 # | |
905 | 89 compile : $(sort $(patsubst %,%.exe,$(shell $(find) compile $(find_filter)))) |
903 | 90 |
91 compile/%.exe : compile/% tools | |
905 | 92 @$(dstress) $(torture)compile $< > obj/$(notdir $<)$(logsuffix) |
903 | 93 @$(CAT) obj/$(notdir $<)$(logsuffix) |
1411 | 94 @$(RM) obj/$(basename $(notdir $<))* |
903 | 95 |
96 # | |
97 # nocompile | |
98 # | |
905 | 99 nocompile : $(sort $(patsubst %,%.exe,$(shell $(find) nocompile $(find_filter)))) |
903 | 100 |
101 nocompile/%.exe : nocompile/% tools | |
905 | 102 @$(dstress) $(torture)nocompile $< > obj/$(notdir $<)$(logsuffix) |
903 | 103 @$(CAT) obj/$(notdir $<)$(logsuffix) |
1411 | 104 @$(RM) obj/$(basename $(notdir $<))* |
903 | 105 |
106 # | |
107 # norun | |
108 # | |
905 | 109 norun : $(sort $(patsubst %,%.exe,$(shell $(find) norun $(find_filter)))) |
903 | 110 |
111 norun/%.exe : norun/% tools | |
905 | 112 @$(dstress) $(torture)norun $< > obj/$(notdir $<)$(logsuffix) |
903 | 113 @$(CAT) obj/$(notdir $<)$(logsuffix) |
1411 | 114 @$(RM) obj/$(basename $(notdir $<))* |
903 | 115 |
116 # | |
117 # run | |
118 # | |
905 | 119 run : $(sort $(patsubst %,%.exe,$(shell $(find) run $(find_filter)))) |
903 | 120 |
121 run/%.exe : run/% tools | |
905 | 122 @$(dstress) $(torture)run $< > obj/$(notdir $<)$(logsuffix) |
903 | 123 @$(CAT) obj/$(notdir $<)$(logsuffix) |
1411 | 124 @$(RM) obj/$(basename $(notdir $<))* |
903 | 125 |
905 | 126 # |
127 # clean | |
128 # | |
129 # | |
913 | 130 clean :: |
936
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
131 $(RM) $(shell $(find) run -name "*exe") |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
132 $(RM) $(shell $(find) norun -name "*exe") |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
133 $(RM) $(shell $(find) compile -name "*exe") |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
134 $(RM) $(shell $(find) nocompile -name "*exe") |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
135 $(RM) obj/[A-E]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
136 $(RM) obj/[F-J]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
137 $(RM) obj/[K-O]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
138 $(RM) obj/[P-T]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
139 $(RM) obj/[U-Z]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
140 $(RM) obj/[a-e]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
141 $(RM) obj/[f-j]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
142 $(RM) obj/[k-o]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
143 $(RM) obj/[p-t]*.* |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
144 $(RM) obj/[u-z]*.* |
1411 | 145 $(RM) obj/* |
936
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
146 $(RM) run.sh norun.sh compile.sh nocompile.sh |
daeca9f37d08
adapeted "clean" target to the large number of files
thomask
parents:
913
diff
changeset
|
147 $(RM) $(dstress) $(crashRun) |
903 | 148 |