File: Makefile

package info (click to toggle)
ats-lang-anairiats 0.2.3-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 19,096 kB
  • sloc: ansic: 222,427; makefile: 2,250; sh: 661
file content (115 lines) | stat: -rw-r--r-- 2,864 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
test: compall
##
## A simple Makefile
##

######

ATSHOMEQ="$(ATSHOME)"
ifeq ($(ATSHOMEQ),"")
ATSHOMEQ="/usr"
ATSLIBQ="/usr/lib/ats-anairiats-0.2.3"
else
ATSLIBQ=$(ATSHOMEQ)
endif

######

ATSCC=$(ATSHOMEQ)/bin/atscc
ATSOPT=$(ATSHOMEQ)/bin/atsopt

######

.PHONY: all
all:: checkall

######

checkall: compall cleanall

######

compall:: fib_mt
fib_mt: fib_mt.dats
	$(ATSCC) -o fib_mt -O3 -D_ATS_MULTITHREAD fib_mt.dats -lpthread

######

compall:: nsieve_mt
nsieve_mt: nsieve_mt.dats
	$(ATSCC) -o nsieve_mt -O3 -D_ATS_MULTITHREAD nsieve_mt.dats -lm -lpthread

compall:: nsieve2_mt
nsieve2_mt: nsieve2_mt.dats
	$(ATSCC) -o nsieve2_mt -O3 -D_ATS_MULTITHREAD nsieve2_mt.dats -lm -lpthread

######

compall:: partial-sums_mt
partial-sums_mt: partial-sums_mt.dats
	$(ATSCC) -o partial-sums_mt -O3 -D_ATS_MULTITHREAD partial-sums_mt.dats -lm -lpthread

######

compall:: qsort_mt_flt
qsort_mt_flt: qsort_mt_flt.dats
	$(ATSCC) -o qsort_mt_flt -O3 -D_ATS_MULTITHREAD qsort_mt_flt.dats -lm -lpthread

compall:: qsort_mt_int
qsort_mt_int: qsort_mt_int.dats
	$(ATSCC) -o qsort_mt_int -O3 -D_ATS_MULTITHREAD qsort_mt_int.dats -lm -lpthread

######

compall:: randcompec_mt
randcompec_mt: randcompec_mt.dats
	$(ATSCC) -o randcompec_mt -O3 -D_ATS_MULTITHREAD randcompec_mt.dats -lpthread

compall:: randcompec2_mt
randcompec2_mt: randcompec2_mt.dats
	$(ATSCC) -o randcompec2_mt -O3 -D_ATS_MULTITHREAD randcompec2_mt.dats -lpthread

compall:: randcompec3_mt
randcompec3_mt: randcompec3_mt.dats
	$(ATSCC) -o randcompec3_mt -O3 -D_ATS_MULTITHREAD randcompec3_mt.dats -lpthread

######

xref:: ; $(ATSOPT) --posmark_xref=XREF -d \
  $(ATSHOME)/utils/xref/ats_prelude_xref.dats > /dev/null
xref:: ; $(ATSOPT) --posmark_xref=XREF -d fib_mt.dats > fib_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d nsieve_mt.dats > nsieve_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d nsieve2_mt.dats > nsieve2_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d partial-sums_mt.dats > partial-sums_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d qsort_mt.dats > qsort_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d qsort_mt_int.dats > qsort_mt_int_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d qsort_mt_flt.dats > qsort_mt_flt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d randcompec_mt.dats > randcompec_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d randcompec2_mt.dats > randcompec2_mt_dats.html
xref:: ; $(ATSOPT) --posmark_xref=XREF -d randcompec3_mt.dats > randcompec3_mt_dats.html

######

RMF=rm -f

######

clean::
	$(RMF) *~
	$(RMF) *_?ats.c

cleanall:: clean
	$(RMF) ./*_?ats.html
	$(RMF) ./XREF/*.html
cleanall::
	$(RMF) fib_mt
	$(RMF) nsieve_mt
	$(RMF) nsieve2_mt
	$(RMF) partial-sums_mt
	$(RMF) qsort_mt_flt
	$(RMF) qsort_mt_int
	$(RMF) randcompec_mt
	$(RMF) randcompec2_mt
	$(RMF) randcompec3_mt

###### end of [Makefile] ######