Self inflicted wounds using cx_freeze
[progcomp2013.git] / qchess / Makefile
1 # Makefile that builds qchess for UCC::Progcomp2013
2
3 SCRIPT=qchess.py
4 DLL_PATH=win32_dll
5
6 all : python_native frozen
7
8 frozen : win32_frozen linux64_frozen
9         cd build; for d in $$(ls); do zip -r $$d.zip $$d; rm -r $$d; done
10
11 python_native : 
12         make -C src
13         mv src/$(SCRIPT) ./
14
15 images :
16         cd tools; python image_builder.py 
17
18 win32_frozen : $(SCRIPT) images
19         sed -i 's:create_images(grid_sz):load_images():g' $(SCRIPT)
20         wine "C:\\Python27\\python.exe" build.py build
21         for d in $$(ls $(DLL_PATH)); do cp $(DLL_PATH)/$$d build/exe.win32-2.7/; done
22         for b in $$(ls build); do if [ -d build/$$b ]; then cp -r data build/$$b; fi; done
23         sed -i 's:load_images():create_images(grid_sz):g' $(SCRIPT)
24
25 linux64_frozen : $(SCRIPT) images
26         sed -i 's:create_images(grid_sz):load_images():g' $(SCRIPT)
27         python build.py build
28         for b in $$(ls build); do if [ -d build/$$b ]; then cp -r data build/$$b; fi; done
29         sed -i 's:load_images():create_images(grid_sz):g' $(SCRIPT)     
30         
31         
32
33 clean :
34         make -C src clean
35         rm -f $(SCRIPT)
36         rm -f *~
37         rm -rf build
38         rm -rf data/images
39         rm -f tools/*~
40         rm -f tools/*.pyc

UCC git Repository :: git.ucc.asn.au