Makefile 18.7 KB
Newer Older
Florian Lugou's avatar
Florian Lugou committed
1 2
export JAVAC  		= javac
export JAR    		= jar
3
JAVA			= java
Florian Lugou's avatar
Florian Lugou committed
4 5 6 7
JAVADOC			= javadoc
MAKE			= make -s
TAR			= tar
GZIP			= gzip
8 9 10 11

export COLOR		= $(shell tput setaf 1)
export RESET		= $(shell tput sgr0)
PREFIX			= [$(COLOR)BASE$(RESET)]             
Ludovic Apvrille's avatar
Ludovic Apvrille committed
12

Florian Lugou's avatar
Florian Lugou committed
13
export TTOOL_PATH 	:= $(shell /bin/pwd)
Ludovic Apvrille's avatar
Ludovic Apvrille committed
14 15

define HELP_message
16 17 18 19
Compilation targets:
--------------------
make all                Build TTool and the jar of companion software.
make ttool		Build TTool only.
Ludovic Apvrille's avatar
Ludovic Apvrille committed
20 21

Usual targets:
22 23 24 25 26 27 28 29 30 31
--------------
make (help)             Print this help.
make documentation      Generate the documentation of java classes using javadoc.
make release            Prepare a new release for the website.
			It produces the release.tgz and releaseWithSrc.tgz files.
make test               Run tests on TTool.
make publish_jar        Build TTool and upload the resulting archive.
			!!! Must have the right ssh key installed for this !!!
make clean              Clean the repository from compilation artifacts.
make ultraclean         Clean the repository from binaries and compilation artifacts.
Ludovic Apvrille's avatar
Ludovic Apvrille committed
32 33 34

Other targets:
--------------
35 36 37 38
make preinstall		Generate a preinstall version of TTool for Linux, Windows and
			MacOS and publish them on perso.telecom-paristech.fr.
			!!! Must have the right ssh key installed for this !!!
make git		Update the build number.
Ludovic Apvrille's avatar
Ludovic Apvrille committed
39 40 41 42 43 44 45


Please report bugs or suggestions of improvements to:
  Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr>
endef
export HELP_message

46
.PHONY: ttool clean launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler documentation help ultraclean publish_jar preinstall test git
Ludovic Apvrille's avatar
Ludovic Apvrille committed
47 48 49 50

help:
	@echo "$$HELP_message"

Florian Lugou's avatar
Florian Lugou committed
51
FORCE:
Ludovic Apvrille's avatar
Ludovic Apvrille committed
52

Florian Lugou's avatar
Florian Lugou committed
53 54 55 56
# ======================================== 
# ========== SUB-PROJECTS BUILD ========== 
# ======================================== 
export TTOOL_SRC 		= $(TTOOL_PATH)/src/main/java
Florian Lugou's avatar
Florian Lugou committed
57
export GLOBAL_JAVA		= $(shell cd $(TTOOL_SRC); find . -name "[^.]*.java")
Florian Lugou's avatar
Florian Lugou committed
58 59 60 61 62 63
export TTOOL_RESOURCES		= $(TTOOL_PATH)/src/main/resources
export TTOOL_WEBCRAWLER_SRC 	= $(TTOOL_PATH)/src/main/java/web/crawler
export TTOOL_BIN 		= $(TTOOL_PATH)/bin
export TTOOL_LIBS		= $(TTOOL_PATH)/libs
export TTOOL_LIBRARIES		= $(wildcard $(TTOOL_LIBS)/*.jar)
export TTOOL_CLASSPATH		= $(subst $(eval) ,:,$(TTOOL_LIBRARIES))
Ludovic Apvrille's avatar
Ludovic Apvrille committed
64

Florian Lugou's avatar
Florian Lugou committed
65
export GLOBAL_CFLAGS		= -encoding "UTF8"
66

Florian Lugou's avatar
Florian Lugou committed
67 68
export TTOOL_DIR		= $(TTOOL_PATH)/ttool
export TTOOL_BINARY 		= $(TTOOL_BIN)/ttool.jar
Ludovic Apvrille's avatar
Ludovic Apvrille committed
69

Florian Lugou's avatar
Florian Lugou committed
70 71
export LAUNCHER_DIR		= $(TTOOL_PATH)/launcher
export LAUNCHER_BINARY 		= $(TTOOL_BIN)/launcher.jar
72

Florian Lugou's avatar
Florian Lugou committed
73 74
export GRAPHMINIMIZE_DIR	= $(TTOOL_PATH)/graphminimize
export GRAPHMINIMIZE_BINARY 	= $(TTOOL_BIN)/graphminimize.jar
75

Florian Lugou's avatar
Florian Lugou committed
76 77
export GRAPHSHOW_DIR		= $(TTOOL_PATH)/graphshow
export GRAPHSHOW_BINARY 	= $(TTOOL_BIN)/graphshow.jar
78

Florian Lugou's avatar
Florian Lugou committed
79 80
export TIFTRANSLATOR_DIR	= $(TTOOL_PATH)/tiftranslator
export TIFTRANSLATOR_BINARY 	= $(TTOOL_BIN)/tiftranslator.jar
81

Florian Lugou's avatar
Florian Lugou committed
82 83
export TMLTRANSLATOR_DIR	= $(TTOOL_PATH)/tmltranslator
export TMLTRANSLATOR_BINARY 	= $(TTOOL_BIN)/tmltranslator.jar
Ludovic Apvrille's avatar
Ludovic Apvrille committed
84

Florian Lugou's avatar
Florian Lugou committed
85 86
export RUNDSE_DIR		= $(TTOOL_PATH)/rundse
export RUNDSE_BINARY 		= $(TTOOL_BIN)/rundse.jar
87

Florian Lugou's avatar
Florian Lugou committed
88 89
export REMOTESIMULATOR_DIR	= $(TTOOL_PATH)/simulationcontrol
export REMOTESIMULATOR_BINARY 	= $(TTOOL_BIN)/simulationcontrol.jar
90

Florian Lugou's avatar
Florian Lugou committed
91 92
export WEBCRAWLER_CLIENT_DIR	= $(TTOOL_PATH)/webcrawler/client
export WEBCRAWLER_CLIENT_BINARY	= $(TTOOL_BIN)/webcrawler-client.jar
93

Florian Lugou's avatar
Florian Lugou committed
94 95
export WEBCRAWLER_SERVER_DIR	= $(TTOOL_PATH)/webcrawler/server
export WEBCRAWLER_SERVER_BINARY	= $(TTOOL_BIN)/webcrawler-server.jar
96

Florian Lugou's avatar
Florian Lugou committed
97 98
export JTTOOL_DIR		= $(TTOOL_PATH)/jttool
export JTTOOL_BINARY		= $(TTOOL_BIN)/jttool.jar
99

Florian Lugou's avatar
Florian Lugou committed
100
all: ttool launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler
101

Florian Lugou's avatar
Florian Lugou committed
102
ttool: $(TTOOL_BINARY)
103

Florian Lugou's avatar
Florian Lugou committed
104 105
$(TTOOL_BINARY): FORCE
	@$(MAKE) -C $(TTOOL_DIR) -e $@
106

Florian Lugou's avatar
Florian Lugou committed
107
launcher: $(LAUNCHER_BINARY)
108

Florian Lugou's avatar
Florian Lugou committed
109 110
$(LAUNCHER_BINARY): FORCE
	@$(MAKE) -C $(LAUNCHER_DIR) -e $@
111

Florian Lugou's avatar
Florian Lugou committed
112
graphminimize: $(GRAPHMINIMIZE_BINARY)
113

Florian Lugou's avatar
Florian Lugou committed
114 115
$(GRAPHMINIMIZE_BINARY): FORCE
	@$(MAKE) -C $(GRAPHMINIMIZE_DIR) -e $@
116

Florian Lugou's avatar
Florian Lugou committed
117
graphshow: $(GRAPHSHOW_BINARY)
118

Florian Lugou's avatar
Florian Lugou committed
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
$(GRAPHSHOW_BINARY): FORCE
	@$(MAKE) -C $(GRAPHSHOW_DIR) -e $@

tiftranslator: $(TIFTRANSLATOR_BINARY)

$(TIFTRANSLATOR_BINARY): FORCE
	@$(MAKE) -C $(TIFTRANSLATOR_DIR) -e $@

tmltranslator: $(TMLTRANSLATOR_BINARY)

$(TMLTRANSLATOR_BINARY): FORCE
	@$(MAKE) -C $(TMLTRANSLATOR_DIR) -e $@

rundse: $(RUNDSE_BINARY)

$(RUNDSE_BINARY): FORCE
	@$(MAKE) -C $(RUNDSE_DIR) -e $@

remotesimulator: $(REMOTESIMULATOR_BINARY)

$(REMOTESIMULATOR_BINARY): FORCE
	@$(MAKE) -C $(REMOTESIMULATOR_DIR) -e $@

webcrawler: $(WEBCRAWLER_CLIENT_BINARY) $(WEBCRAWLER_SERVER_BINARY)

$(WEBCRAWLER_CLIENT_BINARY): FORCE
	@$(MAKE) -C $(WEBCRAWLER_CLIENT_DIR) -e $@

$(WEBCRAWLER_SERVER_BINARY): FORCE
	@$(MAKE) -C $(WEBCRAWLER_SERVER_DIR) -e $@

$(JTTOOL_BINARY): FORCE
	@$(MAKE) -C $(JTTOOL_DIR) -e $@

# ======================================== 
# ==========    DOCUMENTATION   ========== 
# ======================================== 
TTOOL_DOC			= $(TTOOL_PATH)/doc
export TTOOL_DOC_HTML 		= $(TTOOL_DOC)/html

DOCFLAGS			= $(GLOBAL_CFLAGS) -quiet -J-Xmx256m -classpath $(TTOOL_CLASSPATH) -d $(TTOOL_DOC_HTML)

documentation: $(patsubst %,$(TTOOL_SRC)/%,$(GLOBAL_JAVA))
	@echo "$(PREFIX) Generating Javadoc"
	@$(JAVADOC) $(DOCFLAGS) $^

# ======================================== 
# ==========      RELEASES      ========== 
# ======================================== 
TTOOL_PRIVATE 			?= $(TTOOL_PATH)/../TTool-Private

PROD_USERNAME			= apvrille
PROD_ADDRESS			= ssh.enst.fr
PROD_PATH			= public_html/docs

apvrille's avatar
apvrille committed
174 175 176 177
TTOOL_DOC_SOCLIB_USERGUIDE_DIR 	= $(TTOOL_DOC)/documents_soclib/USER_GUIDE
TTOOL_DOC_SOCLIB_USERGUIDE_CMD 	= make user_guide
TTOOL_DOC_SOCLIB_INSTALLATIONGUIDE_DIR 	= $(TTOOL_DOC)/documents_soclib/INSTALLATION_GUIDE
TTOOL_DOC_SOCLIB_INSTALLATIONGUIDE_CMD 	= make installation_guide
Florian Lugou's avatar
Florian Lugou committed
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
TTOOL_MODELING			= $(TTOOL_PATH)/modeling
TTOOL_SIMULATORS 		= $(TTOOL_PATH)/simulators
TTOOL_FIGURES 			= $(TTOOL_PATH)/figures
TTOOL_EXECUTABLECODE 		= $(TTOOL_PATH)/executablecode
TTOOL_MPSOC 			= $(TTOOL_PATH)/MPSoC
TTOOL_STD_RELEASE 		= $(TTOOL_PATH)/release
TTOOL_TARGET_RELEASE 		= $(TTOOL_PATH)/TTool_install
TTOOL_TARGET 			= $(TTOOL_TARGET_RELEASE)/TTool
TTOOL_TARGET_WINDOWS		= $(TTOOL_TARGET_RELEASE)/Windows
TTOOL_TARGET_MACOS		= $(TTOOL_TARGET_RELEASE)/MacOS
TTOOL_TARGET_LINUX		= $(TTOOL_TARGET_RELEASE)/Linux

BASERELEASE			= $(TTOOL_STD_RELEASE)/baseRelease.tar
STDRELEASE			= $(TTOOL_STD_RELEASE)/release.tgz
ADVANCED_RELEASE		= $(TTOOL_STD_RELEASE)/releaseWithSrc.tgz
TTOOL_PREINSTALL_LINUX 		= $(TTOOL_STD_RELEASE)/ttoollinux.tgz
TTOOL_PREINSTALL_WINDOWS 	= $(TTOOL_STD_RELEASE)/ttoolwindows.tgz
TTOOL_PREINSTALL_MACOS 		= $(TTOOL_STD_RELEASE)/ttoolmacos.tgz

197 198 199 200
BUILDER			= $(TTOOL_PATH)/builder.jar
BUILD_INFO		= build.txt
BUILD_TO_MODIFY		= $(TTOOL_SRC)/ui/util/DefaultText.java

Florian Lugou's avatar
Florian Lugou committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
TTOOL_LOTOS_H		= $(patsubst $(TTOOL_DIR)/runtime/%,$(TTOOL_BIN)/%,$(wildcard $(TTOOL_DIR)/runtime/spec*))

RELEASE_STD_FILES_XML 	= $(patsubst %,$(TTOOL_MODELING)/%,\
			  TURTLE/manual-HW.xml \
			  TURTLE/WebV01.xml \
			  TURTLE/Protocol_example1.xml \
			  TURTLE/BasicExchange.xml \
			  DIPLODOCUS/SmartCardProtocol.xml \
			  TURTLE/ProtocolPatterns.xml \
			  CTTool/COCOME_V50.xml \
			  AVATAR/CoffeeMachine_Avatar.xml \
			  AVATAR/Network_Avatar.xml \
			  AVATAR/MicroWaveOven_SafetySecurity_fullMethodo.xml)
RELEASE_STD_FILES_LIB 	= $(patsubst %,$(TTOOL_MODELING)/%,\
			  TURTLE/TClock1.lib \
			  TURTLE/TTimerv01.lib)
RELEASE_STD_FILES_LICENSES 	= $(patsubst %,$(TTOOL_DOC)/%,\
			     	  LICENSE \
				  LICENSE_CECILL_ENG \
				  LICENSE_CECILL_FR)
TTOOL_EXE 		= $(patsubst %,$(TTOOL_DOC)/%,\
			  ttool_linux.exe \
			  ttool_macosx.exe \
			  ttool_windows.bat)
TTOOL_CONFIG_SRC 	= $(patsubst %,$(TTOOL_DOC)/%,\
			  config_linux.xml \
			  config_macosx.xml \
			  config_windows.xml)

release: $(STDRELEASE) $(ADVANCED_RELEASE)

$(TTOOL_STD_RELEASE)/%.tgz: $(TTOOL_STD_RELEASE)/%.tar
	@$(GZIP) -c $< > $@

$(STDRELEASE:.tgz=.tar): $(BASERELEASE:.tgz=.tar)
	@echo "$(PREFIX) Generating standard release"
	@cp $< $@
Ludovic Apvrille's avatar
Ludovic Apvrille committed
238
# LOTOS
Florian Lugou's avatar
Florian Lugou committed
239 240
	@mkdir -p $(TTOOL_TARGET)/lotos
	@cp $(TTOOL_DOC)/README_lotos $(TTOOL_TARGET)/lotos
Ludovic Apvrille's avatar
Ludovic Apvrille committed
241
#NC
Florian Lugou's avatar
Florian Lugou committed
242 243
	@mkdir -p $(TTOOL_TARGET)/nc
	@cp $(TTOOL_DOC)/README_nc $(TTOOL_TARGET)/nc
apvrille's avatar
apvrille committed
244 245 246 247 248 249

	@cd $(TTOOL_DOC_SOCLIB_USERGUIDE_DIR)/&&$(TTOOL_DOC_SOCLIB_USERGUIDE_CMD)
	@cp $(TTOOL_DOC_SOCLIB_USERGUIDE_DIR)/build/user_guide.pdf  $(TTOOL_TARGET)/doc/prototyping_with_soclib_user_guide.pdf
	@cd $(TTOOL_DOC_SOCLIB_INSTALLATIONGUIDE_DIR)/&&$(TTOOL_DOC_SOCLIB_INSTALLATIONGUIDE_CMD)	
	@cp $(TTOOL_DOC_SOCLIB_INSTALLATIONGUIDE_DIR)/build/installation_guide.pdf  $(TTOOL_TARGET)/doc/prototyping_with_soclib_installation_guide.pdf

Florian Lugou's avatar
Florian Lugou committed
250 251 252 253 254 255 256
# Figures
	@cp $(TTOOL_FIGURES)/Makefile $(TTOOL_TARGET)/figures
	@cp $(TTOOL_FIGURES)/mli.mk $(TTOOL_TARGET)/figures
# JTTool
	@mkdir -p $(TTOOL_TARGET)/java
	@cp $(JTTOOL_BINARY) $(TTOOL_TARGET)/java
	@cp $(TTOOL_DOC)/README_java $(TTOOL_TARGET)/java
Ludovic Apvrille's avatar
Ludovic Apvrille committed
257
# Basic bin
Florian Lugou's avatar
Florian Lugou committed
258 259
	@cp $(TTOOL_EXE) $(TTOOL_TARGET)/
	@cp $(TTOOL_LOTOS_H) $(TTOOL_TARGET)/bin
apvrille's avatar
apvrille committed
260
	@$(TAR) uf $@ -C $(TTOOL_TARGET_RELEASE) TTool/lotos TTool/nc TTool/bin TTool/java TTool/figures TTool/nc TTool/lotos TTool/doc/prototyping_with_soclib_installation_guide.pdf TTool/doc/prototyping_with_soclib_user_guide.pdf  $(patsubst $(TTOOL_DOC)/%,TTool/%,$(TTOOL_EXE))
Florian Lugou's avatar
Florian Lugou committed
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320

$(ADVANCED_RELEASE:.tgz=.tar): $(STDRELEASE:.tgz=.tar) documentation
	@echo "$(PREFIX) Generating advanced release"
	@cp $< $@
	@cp -r $(TTOOL_DOC_HTML) $(TTOOL_TARGET)/doc/srcdoc
	@mkdir -p $(TTOOL_TARGET)/src
	@cp -R $(TTOOL_SRC)/* $(TTOOL_TARGET)/src
	@cp -r $(TTOOL_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(LAUNCHER_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(GRAPHMINIMIZE_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(GRAPHSHOW_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(TIFTRANSLATOR_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(TMLTRANSLATOR_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(RUNDSE_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(REMOTESIMULATOR_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(WEBCRAWLER_CLIENT_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@cp -r $(WEBCRAWLER_SERVER_DIR)/src/main/java/* $(TTOOL_TARGET)/src
	@find $(TTOOL_TARGET)/src -type f -not \( -name '*.java' -o -name '*.gif' -o -name '*.jjt' -o -name '*.txt' \) -a -exec rm -f {} \;
	@cp -R $(TTOOL_DOC)/README_src $(TTOOL_TARGET)/src
	@$(TAR) uf $@ -C $(TTOOL_TARGET_RELEASE) TTool/doc/srcdoc TTool/src

$(TTOOL_PREINSTALL_WINDOWS:.tgz=.tar): $(BASERELEASE:.tgz=.tar)
	@echo "$(PREFIX) Generating preinstall for Windows"
	@cp $< $@
	@mkdir -p $(TTOOL_TARGET_WINDOWS)/TTool/bin
	@$(TAR) xzvf $(TTOOL_PRIVATE)/stocks/proverif_windows.tar.gz -C $(TTOOL_TARGET_WINDOWS)
	@$(TAR) xzvf $(TTOOL_PRIVATE)/stocks/uppaal.tar.gz -C $(TTOOL_TARGET_WINDOWS)
	@cp $(TTOOL_DOC)/config_windows.xml $(TTOOL_TARGET_WINDOWS)/TTool/bin/config.xml
	@cp $(TTOOL_DOC)/ttool_windows.bat $(TTOOL_TARGET_WINDOWS)/ttool.bat
	@$(TAR) uf $@ -C $(TTOOL_TARGET_WINDOWS) proverif uppaal TTool/bin/config.xml ttool.bat

$(TTOOL_PREINSTALL_MACOS:.tgz=.tar): $(BASERELEASE:.tgz=.tar)
	@echo "$(PREFIX) Generating preinstall for MacOS"
	@cp $< $@
	@mkdir -p $(TTOOL_TARGET_MACOS)/TTool/bin
	@$(TAR) xzf $(TTOOL_PRIVATE)/stocks/proverif_macos.tar.gz -C $(TTOOL_TARGET_MACOS)
	@$(TAR) xzf $(TTOOL_PRIVATE)/stocks/uppaal_macos.tar.gz -C $(TTOOL_TARGET_MACOS)
	@mv $(TTOOL_TARGET_MACOS)/uppaal* $(TTOOL_TARGET_MACOS)/uppaal
	@cp $(TTOOL_DOC)/config_macosx.xml $(TTOOL_TARGET_MACOS)/TTool/bin/config.xml
	@cp $(TTOOL_DOC)/ttool4preinstalllinux.exe $(TTOOL_TARGET_MACOS)/ttool.exe
	@$(TAR) uf $@ -C $(TTOOL_TARGET_MACOS) proverif uppaal TTool/bin/config.xml ttool.exe

$(TTOOL_PREINSTALL_LINUX:.tgz=.tar): $(BASERELEASE:.tgz=.tar)
	@echo "$(PREFIX) Generating preinstall for Linux"
	@cp $< $@
	@mkdir -p $(TTOOL_TARGET_LINUX)/TTool/bin
	@$(TAR) xzvf $(TTOOL_PRIVATE)/stocks/proverif_linux.tar.gz -C $(TTOOL_TARGET_LINUX)
	@$(TAR) xzvf $(TTOOL_PRIVATE)/stocks/uppaal.tar.gz -C $(TTOOL_TARGET_LINUX)
	@cp $(TTOOL_DOC)/config_linux.xml $(TTOOL_TARGET_LINUX)/TTool/bin/config.xml
	@cp $(TTOOL_DOC)/ttool4preinstalllinux.exe $(TTOOL_TARGET_LINUX)/ttool.exe
	@$(TAR) uf $@ -C $(TTOOL_TARGET_LINUX) proverif uppaal TTool/bin/config.xml ttool.exe

$(BASERELEASE:.tgz=.tar): $(JTTOOL_BINARY) $(TTOOL_BINARY) $(LAUNCHER_BINARY) $(TIFTRANSLATOR_BINARY) $(TMLTRANSLATOR_BINARY) $(RUNDSE_BINARY)
	@echo "$(PREFIX) Preparing base release"
	@rm -rf $(TTOOL_TARGET)
	@mkdir -p $(TTOOL_TARGET)
# modeling
	@mkdir -p $(TTOOL_TARGET)/modeling
	@cp $(RELEASE_STD_FILES_XML) $(TTOOL_TARGET)/modeling
	@cp $(TTOOL_DOC)/README_modeling $(TTOOL_TARGET)/modeling
321
# lib
Florian Lugou's avatar
Florian Lugou committed
322 323 324
	@mkdir -p $(TTOOL_TARGET)/lib
	@cp $(RELEASE_STD_FILES_LIB) $(TTOOL_TARGET)/lib
	@cp $(TTOOL_DOC)/README_lib $(TTOOL_TARGET)/lib
325
# DIPLODOCUS simulators
Florian Lugou's avatar
Florian Lugou committed
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/app
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/arch
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/ebrdd
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/evt
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
	@mkdir -p $(TTOOL_TARGET)/simulators/c++2/lib
	@cp  $(TTOOL_SIMULATORS)/c++2/lib/README $(TTOOL_TARGET)/simulators/c++2/lib/
	@cp  $(TTOOL_SIMULATORS)/c++2/Makefile $(TTOOL_TARGET)/simulators/c++2
	@cp  $(TTOOL_SIMULATORS)/c++2/Makefile.defs $(TTOOL_TARGET)/simulators/c++2
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/app/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/app
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/app/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/app
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/arch/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/arch
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/arch/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/arch
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/ebrdd/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/ebrdd
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/ebrdd/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/ebrdd
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/evt/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/evt
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/evt/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/evt
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
	@cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
350
# Licenses
Florian Lugou's avatar
Florian Lugou committed
351
	@cp $(RELEASE_STD_FILES_LICENSES) $(TTOOL_TARGET)
352
# Main readme
Florian Lugou's avatar
Florian Lugou committed
353
	@cp $(TTOOL_DOC)/README $(TTOOL_TARGET)
354
#TML
Florian Lugou's avatar
Florian Lugou committed
355 356
	@mkdir -p $(TTOOL_TARGET)/tmlcode
	@cp $(TTOOL_DOC)/README_tml $(TTOOL_TARGET)/tmlcode
357
#UPPAAL
Florian Lugou's avatar
Florian Lugou committed
358 359
	@mkdir -p $(TTOOL_TARGET)/uppaal
	@cp $(TTOOL_DOC)/README_uppaal $(TTOOL_TARGET)/uppaal
360
# Proverif
Florian Lugou's avatar
Florian Lugou committed
361 362 363 364 365
	@mkdir -p $(TTOOL_TARGET)/proverif
	@cp $(TTOOL_DOC)/README_proverif $(TTOOL_TARGET)/proverif
# Graphs
	@mkdir -p $(TTOOL_TARGET)/graphs
	@cp $(TTOOL_DOC)/README_graph $(TTOOL_TARGET)/graphs/
366
# Figure
Florian Lugou's avatar
Florian Lugou committed
367 368
	@mkdir -p $(TTOOL_TARGET)/figures
	@cp $(TTOOL_DOC)/README_figure $(TTOOL_TARGET)/figures
369
# VCD
Florian Lugou's avatar
Florian Lugou committed
370 371
	@mkdir -p $(TTOOL_TARGET)/vcd
	@cp $(TTOOL_DOC)/README_vcd $(TTOOL_TARGET)/vcd
372
# Basic doc
Florian Lugou's avatar
Florian Lugou committed
373 374
	@mkdir -p $(TTOOL_TARGET)/doc
	@cp $(TTOOL_DOC)/README_doc $(TTOOL_TARGET)/doc
375
# AVATAR executable code
Florian Lugou's avatar
Florian Lugou committed
376 377 378 379 380 381 382 383 384
	@mkdir -p $(TTOOL_TARGET)/TToolexecutablecode
	@mkdir -p $(TTOOL_TARGET)/executablecode/src
	@mkdir -p $(TTOOL_TARGET)/executablecode/generated_src
	@cp $(TTOOL_EXECUTABLECODE)/Makefile $(TTOOL_TARGET)/executablecode/
	@cp $(TTOOL_EXECUTABLECODE)/Makefile.defs $(TTOOL_TARGET)/executablecode/
	@cp $(TTOOL_EXECUTABLECODE)/Makefile.forsoclib $(TTOOL_TARGET)/executablecode/
	@cp $(TTOOL_EXECUTABLECODE)/src/*.c $(TTOOL_TARGET)/executablecode/src/
	@cp $(TTOOL_EXECUTABLECODE)/src/*.h $(TTOOL_TARGET)/executablecode/src/
	@cp $(TTOOL_EXECUTABLECODE)/generated_src/README $(TTOOL_TARGET)/executablecode/generated_src/
Ludovic Apvrille's avatar
Ludovic Apvrille committed
385
# MPSOC
Florian Lugou's avatar
Florian Lugou committed
386 387 388 389 390 391 392 393 394 395 396 397
	@mkdir -p $(TTOOL_TARGET)/MPSoC
	@mkdir -p $(TTOOL_TARGET)/MPSoC/generated_topcell
	@mkdir -p $(TTOOL_TARGET)/MPSoC/generated_src
	@mkdir -p $(TTOOL_TARGET)/MPSoC/src
	@cp $(TTOOL_MPSOC)/Makefile $(TTOOL_TARGET)/MPSoC/
	@cp $(TTOOL_MPSOC)/Makefile.defs $(TTOOL_TARGET)/MPSoC/
	@cp $(TTOOL_MPSOC)/Makefile.forsoclib $(TTOOL_TARGET)/MPSoC/
	@cp $(TTOOL_MPSOC)/src/*.c $(TTOOL_TARGET)/MPSoC/src/
	@cp $(TTOOL_MPSOC)/src/*.h $(TTOOL_TARGET)/MPSoC/src/
	@cp $(TTOOL_MPSOC)/generated_src/README $(TTOOL_TARGET)/MPSoC/generated_src/
	@cp $(TTOOL_MPSOC)/generated_topcell/nbproc $(TTOOL_TARGET)/MPSoC/generated_topcell/
	@cp $(TTOOL_MPSOC)/generated_topcell/config_noproc $(TTOOL_TARGET)/MPSoC/generated_topcell/
398
# Basic bin
Florian Lugou's avatar
Florian Lugou committed
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
	@mkdir -p $(TTOOL_TARGET)/bin
	@cp $(TTOOL_DOC)/README_bin $(TTOOL_TARGET)/bin
	@cp $(TTOOL_BIN)/*.jar $(TTOOL_TARGET)/bin
	@mkdir -p $(TTOOL_STD_RELEASE)
	@$(TAR) cf $(BASERELEASE) -C $(TTOOL_TARGET_RELEASE) .

publish_jar: $(TTOOL_BINARY)
	@echo "$(PREFIX) Publishing standard and advanced releases"
	scp $< $(PROD_USERNAME)@$(PROD_ADDRESS):$(PROD_PATH)/
	ssh $(PROD_USERNAME)@$(PROD_ADDRESS) "chmod a+r $(PROD_PATH)/$(notdir $<)"

preinstall: $(TTOOL_PREINSTALL_WINDOWS) $(TTOOL_PREINSTALL_LINUX) $(TTOOL_PREINSTALL_MACOS)
	@echo "$(PREFIX) Publishing preinstall versions"
	scp $^ $(PROD_USERNAME)@$(PROD_ADDRESS):$(PROD_PATH)/

414 415 416 417 418 419 420 421
git:
	@echo "$(PREFIX) Updating build number"
	@date
	git pull
	@$(JAVA) -jar $(BUILDER) $(BUILD_INFO) $(BUILD_TO_MODIFY)
	git commit -m 'update on build version: $(BUILD_INFO)' $(BUILD_INFO) $(BUILD_TO_MODIFY)
	git push

Florian Lugou's avatar
Florian Lugou committed
422 423 424 425 426 427 428 429 430
# ======================================== 
# ==========       TESTS        ========== 
# ======================================== 
test:
	@./gradlew test

# ======================================== 
# ==========       CLEAN        ========== 
# ======================================== 
431
clean:
Florian Lugou's avatar
Florian Lugou committed
432 433 434 435 436 437 438 439 440 441 442 443 444
	@$(MAKE) -C $(TTOOL_DIR) -e clean
	@$(MAKE) -C $(LAUNCHER_DIR) -e clean
	@$(MAKE) -C $(GRAPHMINIMIZE_DIR) -e clean
	@$(MAKE) -C $(GRAPHSHOW_DIR) -e clean
	@$(MAKE) -C $(TIFTRANSLATOR_DIR) -e clean
	@$(MAKE) -C $(TMLTRANSLATOR_DIR) -e clean
	@$(MAKE) -C $(RUNDSE_DIR) -e clean
	@$(MAKE) -C $(REMOTESIMULATOR_DIR) -e clean
	@$(MAKE) -C $(WEBCRAWLER_CLIENT_DIR) -e clean
	@$(MAKE) -C $(WEBCRAWLER_SERVER_DIR) -e clean
	@$(MAKE) -C $(JTTOOL_DIR) -e clean
	@rm -rf $(TTOOL_TARGET_RELEASE)
	@rm -f $(TTOOL_STD_RELEASE)/*.tar
Ludovic Apvrille's avatar
Ludovic Apvrille committed
445

446
ultraclean: clean
Florian Lugou's avatar
Florian Lugou committed
447 448 449
	@rm -rf $(TTOOL_BIN)
	@rm -rf $(TTOOL_DOC_HTML)
	@rm -rf $(TTOOL_STD_RELEASE)