|
|
Summary: Some provisional steps for a rpm build Author: Brouard
1: VERSION=0.98nX
2: COPYRIGHT=Copyright (C) 2002-2015 INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121)
3: IMACHSETUPVERSION=1
4:
5: # Linux
6: # make _linux=1 imachopt
7: # make _linux=1 imach
8: #
9: # make _linux32onosx=1 imachopt
10: # make _linux64onosx=1 imachopt
11:
12:
13: # make _macosx=1 imach
14: # make _macosx=1 imachdmg
15: # valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ~/Documents/imachcvs/imach/src/imach-1.129cvsmac radlc-1.129.imach
16:
17: # Windows
18: # make _windows=1 imachcyg
19: # make _windows=1 imachcyg-setup (touch setup.iss.in)
20: # make _windows=1 imachcyg-noreg-setup
21: #
22: # make _windowsonlinux=1 imachcyg-setup (touch setup.iss.in)
23: # make _windowsonlinux=1 imachcyg-noreg-setup
24: #
25:
26: #
27: # sortie dans Output/setup.exe
28: # ln -s /cygdrive/c/Program\ Files/Inno\ Setup\ 4/Compil32.exe /usr/local/bin/Compil32
29: ##SETUPCOMP= "C:\Program Files\Inno Setup 3\Compil32.exe"
30: #TESTFILE=$$HOME/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc-test-mac/adecode-1.142c.imach
31: TESTFILE=$(HOME)/Documents/Recherches/REVES/carol/carol-june2014/educadlmwt24.imach
32: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc-test-mac/adecode-1.142c.imach
33: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc_test_magei4/radlc_often.imach
34: #CC= gcc -v
35: CC=$(GCC)
36: GCC= gcc
37:
38: ifdef _macosx
39: # Mac OS/X version
40: LFLAGS= -g -lm -DUNIX
41: CFLAGS= -g -DUNIX -DOSX
42: LFLAGSOPT= -O3 -lm -DUNIX
43: CFLAGSOPT= -O3 -DUNIX
44: UNIX2DOS= echo "Unix2dos "
45: DSYMUTIL= dsymutil
46: # Don'know how to launch imach098.pmsp in batch to create package file imach098Panther.pkg
47: # ./createdmg.sh imach imach098panther ./imach098Panther
48: # ./createdmg.sh imach imach098leopard ./imach098Leopard
49: # and directory ./imach098Panther contains package file imach098Panther.pkg
50: #./create-dmg --window-size 500 300 --background ~/Projects/eclipse-osx-repackager/build/background.gif --icon-size 96 --volname "Hyper Foo" --icon "Applications" 380 205 --icon "Eclipse OS X Repackager" 110 205 test2.dmg /Users/andreyvit/Projects/eclipse-osx-repackager/temp/Eclipse\ OS\ X\ Repackager\ r10/
51: # ./create-dmg --volname "IMaCh 0.98j" imach098j.dmg imach098Leopard
52: endif
53:
54: ifdef _windows
55: CC=c:\MinGW\bin\Mingw32-gcc
56:
57: # Windows cygwin version
58: LFLAGS= -g -mno-cygwin
59: CFLAGS= -g -mno-cygwin
60: LFLAGSOPT= -O3 -mno-cygwin
61: CFLAGSOPT= -O3 -mno-cygwin
62: UNIX2DOS= unix2dos
63: CP= copy
64: #SETUPCOMP= Compil32
65: ##SETUPCOMP=start /wait "C:\Program\ Files\\Compil32.exe"
66: # cygwin SETUPCOMP= "C:\Program Files\Inno Setup 4\Compil32.exe"
67: SETUPCOMP= "C:////Program Files////Inno Setup 4////Compil32.exe"
68: endif
69:
70: ifdef _windowsonlinux
71: GCC=/usr/bin/i586-pc-mingw32-gcc
72: LFLAGS= -g
73: CFLAGS= -g
74: LFLAGSOPT= -O3 -lm
75: CFLAGSOPT= -O3
76: CP= cp
77: UNIX2DOS= unix2dos
78: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
79: endif
80:
81: ifdef _windowsonosx
82: #GCC=/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc
83: # w64 outputs bigger executables
84: #GCC=/usr/local/cross-tools/bin/i686-w64-mingw32-gcc
85: GCC=/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc-4.8.0
86: STRIP=/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-strip
87: LFLAGS= -g
88: CFLAGS= -g
89: LFLAGSOPT= -O3 -s
90: CFLAGSOPT= -O3
91: UNIX2DOS= unix2dos
92: SETUPCOMP= ~/bin/InnoSetup5Playonmac
93: CP= cp
94: endif
95:
96: ifdef _linux64onosx
97: GCC=/usr/local/gcc-4.8.1-for-linux64/bin/x86_64-pc-linux-gcc
98: STRIP=/usr/local/gcc-4.8.1-for-linux64/bin/x86_64-pc-linux-strip
99: LFLAGS= -g
100: CFLAGS= -g
101: LFLAGSOPT= -O3 -lm -s
102: CFLAGSOPT= -O3
103: UNIX2DOS= unix2dos
104: SETUPCOMP= ~/bin/InnoSetup5Playonmac
105: CP= cp
106: endif
107:
108: ifdef _linux32onosx
109: #GCC=/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc
110: # w64 outputs bigger executables
111: #GCC=/usr/local/cross-tools/bin/i686-w64-mingw32-gcc
112: GCC=/usr/local/gcc-4.8.1-for-linux32/bin/i586-pc-linux-gcc
113: STRIP=/usr/local/gcc-4.8.1-for-linux32/bin/i586-pc-linux-strip
114: LFLAGS= -g
115: CFLAGS= -g
116: LFLAGSOPT= -O3 -s -lm
117: CFLAGSOPT= -O3
118: UNIX2DOS= unix2dos
119: SETUPCOMP= ~/bin/InnoSetup5Playonmac
120: CP= cp
121: endif
122:
123: ifdef _linux
124: #CFLAGS= -g -DUNIX -DDEBUGHESS
125: CFLAGS= -g -DUNIX -DLINUX
126: LFLAGS= -g -lm
127: IGSL= -I/usr/include/gsl
128: LGSL= -lgsl -lgslcblas
129: CFLAGSOPT= -O3 -DUNIX -DLINUX
130: LFLAGSOPT= -O3 -lm
131: UNIX2DOS= unix2dos
132: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
133: endif
134:
135: SED= sed
136: PACKAGE=imach
137: PROGRAM=IMaCh
138:
139:
140:
141: TMPSETUPSCRIPT=setup.iss
142: TMPNOREGSETUPSCRIPT=noreg-setup.iss
143: TMPSCRIPTIN=setup.iss.in
144: APPLICATION=IMaCh
145: APPNAME=$(APPLICATION)-$(VERSION)
146: GNUPLOTVERSION=4.0
147: LICENSE=Copying
148: TMPSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-setup.exe
149: TMPNOREGSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-noreg-setup.exe
150: LICENSEFILE=$(LICENSE)
151: INFOBEFOREFILE=README.txt
152:
153: setup.iss: setup.iss.in
154: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
155: s/@NOTINNOREG@//g; \
156: s/@NOREG@//g; \
157: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
158: s/@VERSION@/$(VERSION)/g; \
159: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
160: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
161: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
162: s/@PACKAGE@/$(PACKAGE)/g; \
163: s/@DICTLANG@/$(DICTLANG)/g; \
164: s/@VERMAJOR@/$(VERMAJOR)/g; \
165: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
166: setup.iss.in > setup.iss
167:
168: $(TMPNOREGSETUPSCRIPT): $(TMPSCRIPTIN)
169: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
170: s/@NOTINNOREG@/\\;/g; \
171: s/@NOREG@/noreg-/g; \
172: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
173: s/@VERSION@/$(VERSION)/g; \
174: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
175: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
176: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
177: s/@PACKAGE@/$(PACKAGE)/g; \
178: s/@DICTLANG@/$(DICTLANG)/g; \
179: s/@VERMAJOR@/$(VERMAJOR)/g; \
180: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
181: $(TMPSCRIPTIN) > $(TMPNOREGSETUPSCRIPT)
182: # $(UNIX2DOS) $(TMPNOREGSETUPSCRIPT)
183:
184: $(TMPSETUPEXE): $(TMPSETUPSCRIPT)
185: $(SETUPCOMP) /cc $(TMPSETUPSCRIPT)
186:
187: $(TMPNOREGSETUPEXE): $(TMPNOREGSETUPSCRIPT)
188: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
189:
190: PARAM=mypar1
191:
192: imachcyg-setup: imachcygopt.exe setup.iss
193: touch setup.iss.in
194: $(CP) imachcygopt.exe imach.exe
195: $(SETUPCOMP) /cc setup.iss
196: cp Output/$(TMPSETUPEXE) imachcyg-setup
197:
198: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
199: imachcyg-noreg-setup: imachcygopt.exe noreg-setup.iss
200: touch setup.iss.in
201: $(CP) imachcygopt.exe imach.exe
202: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
203: cp Output/$(TMPNOREGSETUPEXE) imachcyg-noreg-setup
204:
205: simach : simach.o
206: $(CC) $(LFLAGS) $(LGSL) -o simach simach.o
207: simach.o : simach.c
208: $(CC) $(CFLAGS) -DGSL -c simach.c
209:
210: imach : imach.o
211: $(CC) $(LFLAGS) -o imach imach.o
212: ifdef _macosx
213: $(DSYMUTIL) imach
214: endif
215:
216: imach.o : imach.c
217: $(CC) $(CFLAGS) -DPOWELL -c imach.c
218:
219: imach097b : imach097b.o
220: $(CC) $(LFLAGS) -o imach097b imach097b.o
221: imach097b.o : imach097b.c
222: $(CC) $(CFLAGS) -DPOWELL -c imach097b.c
223:
224:
225: imachsimplified : imachsimplified.o
226: $(CC) $(LFLAGSOPT) -o imachsimplified imachsimplified.o
227: imachsimplified.o : imachsimplified.c
228: $(CC) $(CFLAGSOPT) -DPOWELL -c imachsimplified.c
229:
230: imachgsl : imachgsl.o
231: $(CC) $(LFLAGS) $(LGSL) -o imachgsl imach.o
232: imachgsl.o : imach.c
233: $(CC) $(CFLAGS) -DGSL $(IGSL) -c imach.c
234:
235: imachopt : imachopt.o
236: $(CC) $(LFLAGSOPT) -o imachopt imachopt.o
237: ln -f imachopt imach
238: cp imach ../bin
239: imachopt.o : imach.c
240: $(CC) $(CFLAGSOPT) -DPOWELL -o imachopt.o -c imach.c
241:
242: imachdmg : imachopt.o create-dmg applet IMaChInfo.plist.in IMaChPkgInfo.in IMaCh.icns main.scpt.in IMaCh-ecrandemarrage.rsrc TXT.rtf
243: $(CC) $(LFLAGSOPT) -o imach imachopt.o
244: #hdiutil detach /Volumes/IMaCh\ $(VERSION)
245: rm -rf imach$(VERSION).app
246: mkdir -p imach$(VERSION).app
247: mkdir -p imach$(VERSION).app/Contents
248: mkdir -p imach$(VERSION).app/Contents/MacOS
249: cp applet imach$(VERSION).app/Contents/MacOS
250: mkdir -p imach$(VERSION).app/Contents/Resources
251: mkdir -p imach$(VERSION).app/Contents/Resources/Scripts
252: mkdir -p imach$(VERSION).app/Contents/Resources/bin
253: mkdir -p imach$(VERSION).app/Contents/Resources/html
254: cp imach imach$(VERSION).app/Contents/Resources/bin
255: cp gnuplot_bin/gnuplot_2_6_5_OSX imach$(VERSION).app/Contents/Resources/bin/gnuplot
256: mkdir -p imach$(VERSION).app/Contents/Resources/description.rtfd
257: cp -p TXT.rtf imach$(VERSION).app/Contents/Resources/description.rtfd
258: $(SED) -e "s/@VERSION@/$(VERSION)/g;" \
259: IMaChInfo.plist.in >imach$(VERSION).app/Contents/Info.plist
260: cp -p IMaChPkgInfo.in imach$(VERSION).app/Contents/PkgInfo
261: cp -p IMaCh.icns imach$(VERSION).app/Contents/Resources/applet.icns
262: cp -r -p main.scpt.in imach$(VERSION).app/Contents/Resources/Scripts/main.scpt
263: cp IMaCH-ecrandemarrage.rsrc imach$(VERSION).app/Contents/Resources/applet.rsrc
264: cp ../html/doc/data1.txt imach$(VERSION).app/Contents/Resources/html
265: cp ../html/doc/biaspar.log imach$(VERSION).app/Contents/Resources/html
266: cp ../html/doc/biaspar.imach imach$(VERSION).app/Contents/Resources/html
267: rm -f imach$(VERSION).dmg
268: ./createdmg3.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
269: mv imach$(VERSION).dmg Output/
270: # ./create-dmg --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION).app
271: # ./createdmg2.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
272:
273: upload:
274: ls Output/* | xargs md5sum
275: rsync -v Output/* brouard@henry.ined.fr:/home/euroreves/html/imach/
276:
277: imachcyg : imachcyg.o strsep.o
278: $(CC) $(LFLAGS) -o imach imachcyg.o strsep.o
279: imachcyg.o : imach.c
280: $(CC) $(CFLAGS) -c -o imachcyg.o imach.c
281: imachcygopt.exe : imachcygopt.o strsep.o
282: $(CC) $(LFLAGSOPT) -o imachcygopt.exe imachcygopt.o strsep.o
283: imachcygopt.o : imach.c
284: $(CC) $(CFLAGSOPT) -c -o imachcygopt.o imach.c
285: strsep.o : strsep.c
286: $(CC) $(CFLAGSOPT) -c -o strsep.o strsep.c
287:
288: imachw32.o : imach.c
289: i386-mingw32-gcc -c imach.c -o imachw32.o
290: imach.exe : imachw32.o
291: i386-mingw32-gcc -mwindows -o imach.exe -lm imachw32.o
292: i386-mingw32-strip imach.exe
293:
294: valgrind-test : imach $(TESTFILE)
295: valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./imach $(TESTFILE)
296: test: imach $(TESTFILE)
297: gdb ./imach $(TESTFILE)
298:
299: $(PARAM).htm: imach $(PARAM).imach data1.txt
300: ./imach $(PARAM).imach
301:
302: clean:
303: rm or$(PARAM).txt er$(PARAM).txt pijr$(PARAM).txt plr$(PARAM).txt \
304: r$(PARAM).txt tr$(PARAM).txt vpl$(PARAM).txt pr$(PARAM).txt \
305: vr$(PARAM).txt *.gif imach.exe imach.o
306:
307: