File: Makefile

package info (click to toggle)
cain 1.10+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 29,856 kB
  • sloc: cpp: 49,612; python: 14,988; xml: 11,654; ansic: 3,644; makefile: 133; sh: 2
file content (82 lines) | stat: -rw-r--r-- 2,586 bytes parent folder | download | duplicates (4)
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
# -*- Makefile -*-

# By default make the solvers.
default:
	$(MAKE) -C src/solvers

again: 

clean: 
	$(RM) *~ *.pyc */*.pyc

distclean: clean
	rm -rf Cain
	rm -f Cain.app/Contents/Resources/Cain.py
	rm -rf Cain.app/Contents/Resources/gui
	rm -rf Cain.app/Contents/Resources/fio
	rm -rf Cain.app/Contents/Resources/simulation
	rm -rf Cain.app/Contents/Resources/solvers
	rm -rf Cain.app/Contents/Resources/state
	rm -f solvers/*
	rm -f src/solvers/*.d

test:
	nosetests --with-doctest -v simulation state

# Platform-independent.
pi:
	rm -rf Cain
	mkdir Cain
	mkdir Cain/gui
	mkdir Cain/fio
	mkdir Cain/simulation
	mkdir Cain/state
	cp Cain.py resourcePath.py Makefile Cain
	cp -R gui/*.py gui/*.html gui/*.png gui/icons gui/figures Cain/gui
	cp fio/*.py Cain/fio
	cp simulation/*.py Cain/simulation
	cp state/*.py Cain/state
	cp -R examples help src solvers Cain

# Put the python framework in the Mac OS X bundle.
framework:
	rm -rf Cain.app/Contents/Frameworks/Python.framework
	cp -R /Library/Frameworks/Python.framework Cain.app/Contents/Frameworks
	rm -rf Cain.app/Contents/Frameworks/Python.framework/Versions/2.6

# Mac OS X.
# First compile the executables with SCons and then rm *.o.
bundle:
	rm -rf Cain.app/Contents/Resources/Cain.py \
               Cain.app/Contents/Resources/gui \
               Cain.app/Contents/Resources/fio \
               Cain.app/Contents/Resources/simulation \
               Cain.app/Contents/Resources/src \
               Cain.app/Contents/Resources/solvers \
               Cain.app/Contents/Resources/state 
	mkdir Cain.app/Contents/Resources/gui
	mkdir Cain.app/Contents/Resources/fio
	mkdir Cain.app/Contents/Resources/simulation
	mkdir Cain.app/Contents/Resources/state
	cp Cain.py gui/icons/Cain.icns Cain.app/Contents/Resources
	cp -R gui/*.py gui/*.html gui/*.png gui/icons gui/figures Cain.app/Contents/Resources/gui
	cp fio/*.py Cain.app/Contents/Resources/fio
	cp simulation/*.py Cain.app/Contents/Resources/simulation
	cp -R examples help src solvers Cain.app/Contents/Resources
	cp state/*.py Cain.app/Contents/Resources/state

# MS Windows.
# First compile the executables and rm *.obj
win:
#	cp /c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/VC/redist/x86/Microsoft.VC90.CRT/msvcp90.dll .
	rm -rf build dist
	python setupWin.py py2exe
	cp -R gui/help.html gui/splash.png gui/icons gui/figures dist/gui
	cp -R examples help src solvers dist
	cp msvcp90.dll dist

# Old info for Python 2.5:
# Copy C:\Python25\Lib\site-src\wx\msvcp71.dll to dist
# or
# copy C:\Windows/System32/msvcp71.dll to dist
# after running "make win".