Makefile 2.42 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1 2
all: compile-all

dbarbera's avatar
dbarbera committed
3
test-parse:
4
	@$(MAKE) -s -C tests/regression $@
dbarbera's avatar
dbarbera committed
5 6

test-ada:
7
	@$(MAKE) -s -C tests/regression $@
Maxime Perrotin's avatar
Maxime Perrotin committed
8

dbarbera's avatar
dbarbera committed
9
test-llvm:
10
	@$(MAKE) -s -C tests/regression $@
11

dbarbera's avatar
dbarbera committed
12
benchmark:
13 14 15 16 17 18 19 20 21 22
	@$(MAKE) -s -C tests/regression $@

benchmark-O1:
	@$(MAKE) -s -C tests/regression $@

benchmark-O2:
	@$(MAKE) -s -C tests/regression $@

benchmark-O3:
	@$(MAKE) -s -C tests/regression $@
dbarbera's avatar
dbarbera committed
23

24
coverage:
25
	@$(MAKE) -s -C tests/regression $@
dbarbera's avatar
dbarbera committed
26

27 28
flake8:
	@echo Generating flake8_report file
29
	@cd opengeode && flake8 opengeode.py Pr.py sdlSymbols.py genericSymbols.py ogParser.py \
dbarbera's avatar
dbarbera committed
30 31
	        AdaGenerator.py Renderer.py Clipboard.py Lander.py ogAST.py \
	        undoCommands.py  Connectors.py Asn1scc.py Helper.py \
32
	        Statechart.py TextInteraction.py > flake8_report
33

Maxime Perrotin's avatar
Maxime Perrotin committed
34
compile-all:
35
	@pyside-rcc opengeode.qrc -o opengeode/icons.py
dbarbera's avatar
dbarbera committed
36 37 38 39 40
	@if [ ! -f antlr-3.1.3.tar.bz2 ] ; \
		then wget http://download.tuxfamily.org/taste/misc/antlr-3.1.3.tar.bz2 ; \
		tar jxvf antlr-3.1.3.tar.bz2 ; \
	fi
	@CLASSPATH=$$PWD/antlr-3.1.3/lib/antlr-3.1.3.jar java org.antlr.Tool sdl92.g
41
	@mv sdl92*.py opengeode
Maxime Perrotin's avatar
Maxime Perrotin committed
42

Maxime Perrotin's avatar
Maxime Perrotin committed
43
update:
44 45
	git pull
	#@git submodule update --remote
Maxime Perrotin's avatar
Maxime Perrotin committed
46

Maxime Perrotin's avatar
Maxime Perrotin committed
47
dependencies:
48
	@pip2 install --user --upgrade ./antlr3-python
49 50
	@pip2 install --user --upgrade singledispatch
	@pip2 install --user --upgrade enum34
51 52 53 54 55 56
	@pip2 install --user --upgrade ./speedometer
	#@pip2 install --user --upgrade ./properties
	@pip3 install --user --upgrade ./dmt
	@pip2 install --user --upgrade ./pymsc
	#@pip2 install --user --upgrade ./asn1-value-editor
	@pip2 install --user --upgrade ./pygraphviz
Maxime Perrotin's avatar
Maxime Perrotin committed
57

58
install:
59
	@pip2 install --user --upgrade .
Maxime Perrotin's avatar
Maxime Perrotin committed
60

61 62
full-install: update dependencies install

Maxime Perrotin's avatar
Maxime Perrotin committed
63
publish: 
dbarbera's avatar
dbarbera committed
64
	@python setup.py sdist upload
Maxime Perrotin's avatar
Maxime Perrotin committed
65

66 67 68
freeze-linux:
	@bash -c "test -f pyinstaller-opengeode.tar.gz || wget http://download.tuxfamily.org/taste/misc/pyinstaller-opengeode.tar.gz"
	@tar zxvf pyinstaller-opengeode.tar.gz
69
	@cd pyinstaller-pyinstaller-953f6e3 && python pyinstaller.py ../opengeode/opengeode.py --onefile && mkdir -p ../dist-linux && mv opengeode/dist/opengeode ../dist-linux && cd ..
70 71
	@echo binary installed in ./dist-linux/

Maxime Perrotin's avatar
Maxime Perrotin committed
72
clean:
73
	@$(MAKE) -s -C tests/regression $@
dbarbera's avatar
dbarbera committed
74 75
	@find . -name '*~' | xargs rm -f
	@find . -name '*.o' | xargs rm -f
76 77 78
	@rm -f pyinstaller-opengeode.tar.gz
	@rm -rf dist-linux
	@rm -rf pyinstaller-pyinstaller-953f6e3
79
	@rm -rf opengode/*.pyc dist build *.egg-info
dbarbera's avatar
dbarbera committed
80

81
.PHONY: all test-parse test-ada test-llvm benchmark benchmark-O1 benchmark-O2 \
82
	    benchmark-O3 flake8 coverage compile-all install publish clean freeze-linux