File: Makefile

package info (click to toggle)
spark 2012.0.deb-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 29,260 kB
  • ctags: 3,098
  • sloc: ada: 186,243; cpp: 13,497; makefile: 685; yacc: 440; lex: 176; ansic: 119; sh: 16
file content (197 lines) | stat: -rw-r--r-- 7,210 bytes parent folder | download | duplicates (2)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# -----------------------------------------------------------------------------
#  (C) Altran Praxis Limited
# -----------------------------------------------------------------------------
# 
#  The SPARK toolset is free software; you can redistribute it and/or modify it
#  under terms of the GNU General Public License as published by the Free
#  Software Foundation; either version 3, or (at your option) any later
#  version. The SPARK toolset is distributed in the hope that it will be
#  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
#  Public License for more details. You should have received a copy of the GNU
#  General Public License distributed with the SPARK toolset; see file
#  COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy of
#  the license.
# 
# =============================================================================

################################################################################
# PURPOSE
#-------------------------------------------------------------------------------
# Makefile for the entire Spark Toolset source distribution
# Build the SPARK Toolset on NT, Solaris, Linux or MacOS X
################################################################################

################################################################################
# BUILD CONFIGURATION
################################################################################

################################################################################
# DETERMINE HOST INFORMATION
################################################################################

# Determine which platform this Makefile is being run on.
TARGET:=Linux
GCC_TARGET:=$(shell gcc -dumpmachine)

# Canonicalize the target string.
ifeq ($(findstring CYGWIN_NT,${TARGET}),CYGWIN_NT)
   TARGET:=Windows
endif

################################################################################
# PLATFORM SPECIFIC CONFIGURATION
################################################################################

BUILD_VICTOR:=false

# Windows.
ifeq (${TARGET},Windows)
    EXEEXTN:=.exe
    ifeq (${GCC_TARGET},i686-pc-mingw32)
        BUILD_VICTOR:=true
    endif
endif

# Sun.
ifeq (${TARGET},SunOS)
    EXEEXTN:=
endif

# Linux.
ifeq (${TARGET},Linux)
    EXEEXTN:=
    BUILD_VICTOR:=true
endif

# Darwin (Mac OS X).
ifeq (${TARGET},Darwin)
    EXEEXTN:=
    BUILD_VICTOR:=true
endif

################################################################################
# TARGETS
################################################################################

# Build all of the tools, copy them to bin, and clean up.
all:
	$(MAKE) makeall
	$(MAKE) copyall 
	$(MAKE) cleanall

################################################################################
# BUILDS
################################################################################

makeall:
	$(MAKE) -C sparklalr
	$(MAKE) -C examiner
	$(MAKE) -C simplifier
	$(MAKE) -C wraputility
	$(MAKE) -C checker
	$(MAKE) -C pogs
	$(MAKE) -C sparkclean
	$(MAKE) -C sparkformat
	$(MAKE) -C sparkmake
	$(MAKE) -C sparksimp
	$(MAKE) -C victor
	$(MAKE) -C victor_wrapper

copyall:
	cp ./examiner/spark${EXEEXTN}           ./bin/
	cp ./simplifier/spadesimp${EXEEXTN}     ./bin/
	cp ./simplifier/zombiescope${EXEEXTN}   ./bin/
	cp ./wraputility/wrap_utility${EXEEXTN} ./bin/
	cp ./checker/checker${EXEEXTN}          ./bin/
	cp ./pogs/pogs${EXEEXTN}                ./bin/
	cp ./sparkclean/sparkclean${EXEEXTN}    ./bin/
	cp ./sparkformat/sparkformat${EXEEXTN}  ./bin/
	cp ./sparkmake/sparkmake${EXEEXTN}      ./bin/
	cp ./sparksimp/sparksimp${EXEEXTN}      ./bin/
	cp ./victor_wrapper/victor${EXEEXTN}    ./bin/
ifeq (${BUILD_VICTOR},true)
	cp ./victor/vct/bin/vct${EXEEXTN}       ./bin/
endif
	cp ./victor/vct/run/prelude.fdl         ./share/spark/
	cp ./victor/vct/run/prelude.rul         ./share/spark/
	cp ./victor/vct/run/divmod.rul          ./share/spark/
ifeq (${TARGET},Windows)
	# Copy manifests for SICStus tools.
	cp ./simplifier/spadesimp${EXEEXTN}.manifest   ./bin/
	cp ./simplifier/zombiescope${EXEEXTN}.manifest ./bin/
	cp ./checker/checker${EXEEXTN}.manifest        ./bin/
	# Copy the required DLLs into bin.
	cp ./dlls/*                                    ./bin/
endif

cleanall:
	$(MAKE) -C sparklalr      clean
	$(MAKE) -C examiner       clean
	$(MAKE) -C simplifier     clean
	$(MAKE) -C wraputility    clean
	$(MAKE) -C checker        clean
	$(MAKE) -C pogs           clean
	$(MAKE) -C sparkclean     clean
	$(MAKE) -C sparkformat    clean
	$(MAKE) -C sparkmake      clean
	$(MAKE) -C sparksimp      clean
	$(MAKE) -C victor         clean
	$(MAKE) -C victor_wrapper clean

reallycleanall:
	rm -f ./bin/*
	rm -f ./share/spark/*
	$(MAKE) -C sparklalr      reallyclean
	$(MAKE) -C examiner       reallyclean
	$(MAKE) -C simplifier     reallyclean
	$(MAKE) -C wraputility    reallyclean
	$(MAKE) -C checker        reallyclean
	$(MAKE) -C pogs           reallyclean
	$(MAKE) -C sparkclean     reallyclean
	$(MAKE) -C sparkformat    reallyclean
	$(MAKE) -C sparkmake      reallyclean
	$(MAKE) -C sparksimp      reallyclean
	$(MAKE) -C victor         clean
	$(MAKE) -C victor_wrapper reallyclean

analyseall:
	-$(MAKE) -C sparklalr      self-analysis
	-$(MAKE) -C examiner       self-analysis
	-$(MAKE) -C simplifier     spxref
	-$(MAKE) -C wraputility    self-analysis
	-$(MAKE) -C checker        spxref
	-$(MAKE) -C pogs           self-analysis
	-$(MAKE) -C sparkclean     self-analysis
	-$(MAKE) -C sparkformat    self-analysis
	-$(MAKE) -C sparkmake      self-analysis
	-$(MAKE) -C victor_wrapper self-analysis

analyseallplain:
	-$(MAKE) -C sparklalr      self-analysis
	-$(MAKE) -C examiner       self-analysis
	-$(MAKE) -C simplifier     spxrefplain
	-$(MAKE) -C wraputility    self-analysis
	-$(MAKE) -C checker        spxrefplain
	-$(MAKE) -C pogs           self-analysis
	-$(MAKE) -C sparkclean     self-analysis
	-$(MAKE) -C sparkformat    self-analysis
	-$(MAKE) -C sparkmake      self-analysis
	-$(MAKE) -C victor_wrapper self-analysis

# Regenerate the reference results.
# (May be used to capture analysis of the current code base).
generaterereference: analyseallplain
	cp ./sparklalr/vcg/sparklalr.rep      ./analyse/referenceanalysis/sparklalr.rep
	cp ./examiner/vcg/mainunits95.rep     ./analyse/referenceanalysis/examiner.rep
	cp ./simplifier/spxref_undefined.txt  ./analyse/referenceanalysis/simplifier_spxref_undefined.txt
	cp ./wraputility/vcg/wrap_utility.rep ./analyse/referenceanalysis/wrap_utility.rep
	cp ./checker/spxref_undefined.txt     ./analyse/referenceanalysis/checker_spxref_undefined.txt
	cp ./pogs/vcg/pogs.rep                ./analyse/referenceanalysis/pogs.rep
	cp ./sparkclean/vcg/sparkclean.rep    ./analyse/referenceanalysis/sparkclean.rep
	cp ./sparkformat/vcg/sparkformat.rep  ./analyse/referenceanalysis/sparkformat.rep
	cp ./sparkmake/vcg/sparkmake.rep      ./analyse/referenceanalysis/sparkmake.rep
	cp ./victor_wrapper/vcg/victor.rep    ./analyse/referenceanalysis/victor.rep

################################################################################
# END-OF-FILE