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

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