1 | MACHINE=$(shell uname -s) |
---|
2 | SHELL=/bin/bash |
---|
3 | preprojects = QUANTA/src |
---|
4 | subprojects = app/render app/atlantis app/checker app/FileViewer app/bitplay app/vnc |
---|
5 | |
---|
6 | PREFIX=${RPM_BUILD_ROOT} |
---|
7 | |
---|
8 | |
---|
9 | default: |
---|
10 | @for i in `echo $(preprojects)`; do cd $$i; $(MAKE) install; cd - ; done |
---|
11 | @cd src; $(MAKE) install; cd - |
---|
12 | @for i in `echo $(subprojects)`; do cd $$i; $(MAKE); cd - ; done |
---|
13 | |
---|
14 | build: default |
---|
15 | @for i in `echo $(preprojects)`; do cd $$i; $(MAKE) install; cd - ; done |
---|
16 | @for i in `echo $(subprojects)`; do cd $$i; $(MAKE) install; cd - ; done |
---|
17 | |
---|
18 | install: build |
---|
19 | # make directories |
---|
20 | mkdir -p ${PREFIX}/usr/local/sage/bin |
---|
21 | mkdir -p ${PREFIX}/usr/local/sage/bin/fileServer |
---|
22 | mkdir -p ${PREFIX}/usr/local/sage/sageConfig/ |
---|
23 | mkdir -p ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
24 | mkdir -p ${PREFIX}/usr/local/sage/sageConfig/fileServer |
---|
25 | mkdir -p ${PREFIX}/usr/local/sage/bin/sageProxy |
---|
26 | mkdir -p ${PREFIX}/usr/local/sage/bin/log |
---|
27 | mkdir -p ${PREFIX}/usr/local/sage/bin/appLauncher |
---|
28 | mkdir -p ${PREFIX}/usr/local/sage/include |
---|
29 | ifeq ($(MACHINE), Darwin) |
---|
30 | mkdir -p ${PREFIX}/usr/local/sage/lib |
---|
31 | else |
---|
32 | mkdir -p ${PREFIX}/usr/local/sage/lib64 |
---|
33 | endif |
---|
34 | mkdir -p ${PREFIX}/usr/local/sage/dim |
---|
35 | mkdir -p ${PREFIX}/usr/local/sage/dim/devices |
---|
36 | mkdir -p ${PREFIX}/usr/local/sage/dim/hwcapture |
---|
37 | mkdir -p ${PREFIX}/usr/local/sage/dim/overlays |
---|
38 | mkdir -p ${PREFIX}/usr/local/sage/dim/sounds |
---|
39 | mkdir -p ${PREFIX}/usr/local/sage/dim/ui |
---|
40 | mkdir -p ${PREFIX}/usr/local/sage/ui |
---|
41 | mkdir -p ${PREFIX}/usr/local/sage/ui/misc |
---|
42 | mkdir -p ${PREFIX}/usr/local/sage/ui/connectionManager |
---|
43 | mkdir -p ${PREFIX}/usr/local/sage/ui/images |
---|
44 | mkdir -p ${PREFIX}/usr/local/sage/ui/sessions |
---|
45 | mkdir -p ${PREFIX}/etc/profile.d |
---|
46 | mkdir -p ${PREFIX}/etc/ld.so.conf.d |
---|
47 | # copy OS environment settings |
---|
48 | cp etc/sage.csh ${PREFIX}/etc/profile.d |
---|
49 | cp etc/sage.sh ${PREFIX}/etc/profile.d |
---|
50 | cp etc/sage.conf ${PREFIX}/etc/ld.so.conf.d |
---|
51 | # copy binaries |
---|
52 | cp bin/fsManager ${PREFIX}/usr/local/sage/bin |
---|
53 | cp bin/sageDisplayManager ${PREFIX}/usr/local/sage/bin |
---|
54 | ifeq ($(MACHINE), Darwin) |
---|
55 | cp -r bin/sageDisplayManager.app ${PREFIX}/usr/local/sage/bin |
---|
56 | endif |
---|
57 | cp bin/render ${PREFIX}/usr/local/sage/bin |
---|
58 | cp bin/atlantis ${PREFIX}/usr/local/sage/bin |
---|
59 | cp bin/checker ${PREFIX}/usr/local/sage/bin |
---|
60 | cp bin/imageviewer ${PREFIX}/usr/local/sage/bin |
---|
61 | cp bin/pdfviewer ${PREFIX}/usr/local/sage/bin |
---|
62 | cp bin/bplay-noglut ${PREFIX}/usr/local/sage/bin |
---|
63 | cp bin/bridgeConsole ${PREFIX}/usr/local/sage/bin |
---|
64 | cp bin/fsConsole ${PREFIX}/usr/local/sage/bin |
---|
65 | cp bin/sageBridge ${PREFIX}/usr/local/sage/bin |
---|
66 | cp bin/uiConsole ${PREFIX}/usr/local/sage/bin |
---|
67 | cp bin/VNCViewer ${PREFIX}/usr/local/sage/bin |
---|
68 | # copy configuration files |
---|
69 | cp sageConfig/applications/atlantis.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
70 | cp sageConfig/applications/bitplayer.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
71 | cp sageConfig/applications/imageviewer.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
72 | cp sageConfig/applications/pdfviewer.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
73 | cp sageConfig/applications/render.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
74 | cp sageConfig/applications/VNCViewer.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
75 | cp sageConfig/fsManager.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
76 | cp sageConfig/sageBridge.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
77 | cp sageConfig/stdtile.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
78 | cp sageConfig/stdtile-1.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
79 | cp sageConfig/stdtile-2.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
80 | cp sageConfig/stdtile-20.conf ${PREFIX}/usr/local/sage/sageConfig |
---|
81 | # copy utility files |
---|
82 | cp bin/yuv.vert ${PREFIX}/usr/local/sage/bin |
---|
83 | cp bin/yuv.frag ${PREFIX}/usr/local/sage/bin |
---|
84 | cp bin/sage ${PREFIX}/usr/local/sage/bin |
---|
85 | cp bin/sageLauncher.py ${PREFIX}/usr/local/sage/bin |
---|
86 | cp bin/sagePath.py ${PREFIX}/usr/local/sage/bin |
---|
87 | cp bin/subprocess.py ${PREFIX}/usr/local/sage/bin |
---|
88 | # copy includes |
---|
89 | cp include/*.h ${PREFIX}/usr/local/sage/include |
---|
90 | # copy libraries |
---|
91 | ifeq ($(MACHINE), Darwin) |
---|
92 | cp lib/libquanta.dylib ${PREFIX}/usr/local/sage/lib |
---|
93 | cp lib/libsail.dylib ${PREFIX}/usr/local/sage/lib |
---|
94 | else |
---|
95 | cp lib/libquanta.so ${PREFIX}/usr/local/sage/lib64 |
---|
96 | cp lib/libsail.so ${PREFIX}/usr/local/sage/lib64 |
---|
97 | endif |
---|
98 | # copy appLauncher files |
---|
99 | cp bin/appLauncher/*.py ${PREFIX}/usr/local/sage/bin/appLauncher |
---|
100 | cp bin/appLauncher/GO ${PREFIX}/usr/local/sage/bin/appLauncher |
---|
101 | cp sageConfig/applications/applications.conf ${PREFIX}/usr/local/sage/sageConfig/applications |
---|
102 | cp bin/appLauncher/README ${PREFIX}/usr/local/sage/bin/appLauncher |
---|
103 | # copy file server files |
---|
104 | cp bin/fileServer/*.py ${PREFIX}/usr/local/sage/bin/fileServer |
---|
105 | cp sageConfig/fileServer/fileServer.conf ${PREFIX}/usr/local/sage/sageConfig/fileServer |
---|
106 | ifeq ($(MACHINE), Darwin) |
---|
107 | cp -fr bin/fileServer/misc ${PREFIX}/usr/local/sage/bin/fileServer |
---|
108 | else |
---|
109 | cp -fru bin/fileServer/misc ${PREFIX}/usr/local/sage/bin/fileServer |
---|
110 | endif |
---|
111 | # copy sage proxy files |
---|
112 | cp bin/sageProxy/*.py ${PREFIX}/usr/local/sage/bin/sageProxy |
---|
113 | # copy UI files |
---|
114 | cp ui/*.py ${PREFIX}/usr/local/sage/ui/ |
---|
115 | cp ui/misc/*.py ${PREFIX}/usr/local/sage/ui/misc/ |
---|
116 | cp ui/connectionManager/*.py ${PREFIX}/usr/local/sage/ui/connectionManager/ |
---|
117 | cp ui/connectionManager/README ${PREFIX}/usr/local/sage/ui/connectionManager/ |
---|
118 | cp ui/images/*.jpg ${PREFIX}/usr/local/sage/ui/images/ |
---|
119 | cp ui/images/*.png ${PREFIX}/usr/local/sage/ui/images/ |
---|
120 | cp ui/images/*.gif ${PREFIX}/usr/local/sage/ui/images/ |
---|
121 | # compile and copy DIM files |
---|
122 | cp dim/*.py ${PREFIX}/usr/local/sage/dim/ |
---|
123 | cp dim/devices/*.py ${PREFIX}/usr/local/sage/dim/devices/ |
---|
124 | cp dim/hwcapture/*.py ${PREFIX}/usr/local/sage/dim/hwcapture/ |
---|
125 | cp dim/hwcapture/go.bat ${PREFIX}/usr/local/sage/dim/hwcapture/ |
---|
126 | cp dim/hwcapture/mouse_to_joy.PIE ${PREFIX}/usr/local/sage/dim/hwcapture/ |
---|
127 | cp dim/overlays/*.py ${PREFIX}/usr/local/sage/dim/overlays/ |
---|
128 | cp dim/*.png ${PREFIX}/usr/local/sage/dim/ |
---|
129 | |
---|
130 | |
---|
131 | clean: |
---|
132 | @for i in `echo $(preprojects)`; do cd $$i; $(MAKE) $@; cd - ; done |
---|
133 | @for i in `echo src $(subprojects)`; do cd $$i; $(MAKE) $@; cd - ; done |
---|
134 | |
---|