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=ilc64
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: # OS/X
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 _windowsonosx=1 imachILC64-setup (touch setup.iss.in) #binary should have been compiled on Windows with cl
19: # make _windowsonosx=1 imachMVC-setup (touch setup.iss.in) #binary should have been compiled on Windows with cl
20: # make imachMVC-noreg-setup
21: #
22: # Windows cross-compiled mw64
23: # make _mw64onsox=1 imachcyg-setup
24: #
25: # make _windows=1 imachcyg
26: # make _windows=1 imachcyg-setup (touch setup.iss.in)
27: # make _windows=1 imachcyg-noreg-setup
28: #
29: # make _windowsonlinux=1 imachcyg-setup (touch setup.iss.in)
30: # make _windowsonlinux=1 imachcyg-noreg-setup
31: #
32: # make _windowscl=1 imachclopt
33:
34: #
35: # sortie dans Output/setup.exe
36: # ln -s /cygdrive/c/Program\ Files/Inno\ Setup\ 4/Compil32.exe /usr/local/bin/Compil32
37: ##SETUPCOMP= "C:\Program Files\Inno Setup 3\Compil32.exe"
38: #TESTFILE=$$HOME/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc-test-mac/adecode-1.142c.imach
39: #TESTFILE=$(HOME)/Documents/Recherches/REVES/carol/carol-june2014/educadlmwt24.imach
40: TESTFILE=$(HOME)/Documents/Recherches/REVES/Biaspar/biaspar-wopowell.imach
41: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc-test-mac/adecode-1.142c.imach
42: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc_test_magei4/radlc_often.imach
43: #CC= gcc -v
44: CC=$(GCC)
45: GCC= gcc
46:
47: ifdef _macosx
48: # Mac OS/X version
49: LFLAGS= -g -lm
50: CFLAGS= -g -DDEBUG
51: LFLAGSOPT= -O3 -lm
52: CFLAGSOPT= -O3
53: UNIX2DOS= echo "Unix2dos "
54: DSYMUTIL= dsymutil
55: STRIP= strip
56: BINVERSION=OSX
57: # Don'know how to launch imach098.pmsp in batch to create package file imach098Panther.pkg
58: # ./createdmg.sh imach imach098panther ./imach098Panther
59: # ./createdmg.sh imach imach098leopard ./imach098Leopard
60: # and directory ./imach098Panther contains package file imach098Panther.pkg
61: #./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/
62: # ./create-dmg --volname "IMaCh 0.98j" imach098j.dmg imach098Leopard
63: endif
64:
65: ifdef _windows
66: CC=c:\MinGW\bin\Mingw32-gcc
67:
68: # Windows cygwin version
69: LFLAGS= -g -mno-cygwin
70: CFLAGS= -g -mno-cygwin
71: LFLAGSOPT= -O3 -mno-cygwin
72: CFLAGSOPT= -O3 -mno-cygwin
73: UNIX2DOS= unix2dos
74: CP= copy
75: BINVERSION=CYGWIN
76: #SETUPCOMP= Compil32
77: ##SETUPCOMP=start /wait "C:\Program\ Files\\Compil32.exe"
78: # cygwin SETUPCOMP= "C:\Program Files\Inno Setup 4\Compil32.exe"
79: SETUPCOMP= "C:////Program Files////Inno Setup 4////Compil32.exe"
80: endif
81:
82: ifdef _windowsonlinux
83: GCC=/usr/bin/i586-pc-mingw32-gcc
84: LFLAGS= -g
85: CFLAGS= -g
86: LFLAGSOPT= -O3 -lm
87: CFLAGSOPT= -O3
88: CP= cp
89: UNIX2DOS= unix2dos
90: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
91: BINVERSION=WINDOWSonLINUX
92: endif
93:
94: ifdef _windowsonosx
95: #GCC=/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc
96: #GCC=/usr/local/cross-tools/bin/i686-w64-mingw32-gcc
97: GCC=/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc-4.8.0
98: STRIP=/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-strip
99: LFLAGS= -g
100: CFLAGS= -g
101: LFLAGSOPT= -O3 -s
102: CFLAGSOPT= -O3
103: UNIX2DOS= unix2dos
104: SETUPCOMP= ~/bin/InnoSetup5Playonmac
105: CP= cp
106: BINVERSION=WIN32onOSX
107: endif
108:
109: ifdef _mw64onosx
110: GCC=/usr/local/mingw-w64-bin_i686-darwin_20130622/bin/x86_64-w64-mingw32-gcc-4.9.0
111: STRIP=/usr/local/mingw-w64-bin_i686-darwin_20130622/bin/x86_64-w64-mingw32-strip
112: LFLAGS= -g
113: CFLAGS= -g
114: LFLAGSOPT= -O3 -lm -s
115: CFLAGSOPT= -O3
116: UNIX2DOS= unix2dos
117: SETUPCOMP= ~/bin/InnoSetup5Playonmac
118: CP= cp
119: BINVERSION=w64-mingw32-x86-64-bin
120: endif
121:
122: ifdef _windowscl
123: rem "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvas32.bat"
124: endif
125:
126: ifdef _linux64onosx
127: GCC=/usr/local/gcc-4.8.1-for-linux64/bin/x86_64-pc-linux-gcc
128: STRIP=/usr/local/gcc-4.8.1-for-linux64/bin/x86_64-pc-linux-strip
129: LFLAGS= -g
130: CFLAGS= -g
131: LFLAGSOPT= -O3 -lm -s
132: CFLAGSOPT= -O3
133: UNIX2DOS= unix2dos
134: SETUPCOMP= ~/bin/InnoSetup5Playonmac
135: CP= cp
136: BINVERSION=linux-x86-64-bin
137: endif
138:
139: ifdef _linux32onosx
140: #GCC=/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc
141: #GCC=/usr/local/cross-tools/bin/i686-w64-mingw32-gcc
142: GCC=/usr/local/gcc-4.8.1-for-linux32/bin/i586-pc-linux-gcc
143: STRIP=/usr/local/gcc-4.8.1-for-linux32/bin/i586-pc-linux-strip
144: LFLAGS= -g
145: CFLAGS= -g
146: LFLAGSOPT= -O3 -s -lm
147: CFLAGSOPT= -O3
148: UNIX2DOS= unix2dos
149: SETUPCOMP= ~/bin/InnoSetup5Playonmac
150: CP= cp
151: BINVERSION=linux-i586-bin
152: endif
153:
154: ifdef _linux
155: #CFLAGS= -g -DUNIX -DDEBUGHESS
156: CFLAGS= -g -DUNIX -DLINUX
157: LFLAGS= -g -lm
158: IGSL= -I/usr/include/gsl
159: LGSL= -lgsl -lgslcblas
160: INLOPT= -I/usr/local/include
161: LNLOPT= -lm -L/usr/local/lib -lnlopt
162: CFLAGSOPT= -O3 -DUNIX -DLINUX
163: LFLAGSOPT= -O3 -lm -s
164: UNIX2DOS= unix2dos
165: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
166: BINVERSION=LINUXnative
167: endif
168:
169: SED= sed
170: PACKAGE=imach
171: PROGRAM=IMaCh
172:
173:
174: TMPSETUPSCRIPT=setup.iss
175: TMPNOREGSETUPSCRIPT=noreg-setup.iss
176: TMPSCRIPTIN=setup.iss.in
177: APPLICATION=IMaCh
178: APPNAME=$(APPLICATION)-$(VERSION)
179: GNUPLOTVERSION=4.0
180: LICENSE=Copying
181: TMPSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-setup.exe
182: TMPNOREGSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-noreg-setup.exe
183: LICENSEFILE=$(LICENSE)
184: INFOBEFOREFILE=README.txt
185:
186: setup.iss: setup.iss.in
187: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
188: s/@NOTINNOREG@//g; \
189: s/@NOREG@//g; \
190: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
191: s/@VERSION@/$(VERSION)/g; \
192: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
193: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
194: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
195: s/@PACKAGE@/$(PACKAGE)/g; \
196: s/@DICTLANG@/$(DICTLANG)/g; \
197: s/@VERMAJOR@/$(VERMAJOR)/g; \
198: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
199: setup.iss.in > setup.iss
200:
201: $(TMPNOREGSETUPSCRIPT): $(TMPSCRIPTIN)
202: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
203: s/@NOTINNOREG@/\\;/g; \
204: s/@NOREG@/noreg-/g; \
205: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
206: s/@VERSION@/$(VERSION)/g; \
207: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
208: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
209: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
210: s/@PACKAGE@/$(PACKAGE)/g; \
211: s/@DICTLANG@/$(DICTLANG)/g; \
212: s/@VERMAJOR@/$(VERMAJOR)/g; \
213: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
214: $(TMPSCRIPTIN) > $(TMPNOREGSETUPSCRIPT)
215: # $(UNIX2DOS) $(TMPNOREGSETUPSCRIPT)
216:
217: $(TMPSETUPEXE): $(TMPSETUPSCRIPT)
218: $(SETUPCOMP) /cc $(TMPSETUPSCRIPT)
219:
220: $(TMPNOREGSETUPEXE): $(TMPNOREGSETUPSCRIPT)
221: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
222:
223: PARAM=mypar1
224:
225: imachcyg-setup: imachcygopt.exe setup.iss
226: touch setup.iss.in
227: $(CP) imachcygopt.exe imach.exe
228: $(CP) imachcygopt.exe imach$(VERSION)-$(BINVERSION).exe
229: $(SETUPCOMP) /cc setup.iss
230: cp Output/$(TMPSETUPEXE) imachcyg-setup
231:
232: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
233: imachcyg-noreg-setup: imachcygopt.exe noreg-setup.iss
234: touch setup.iss.in
235: $(CP) imachcygopt.exe imach.exe
236: $(CP) imachcygopt.exe imach$(VERSION)-$(BINVERSION).exe
237: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
238: cp Output/$(TMPNOREGSETUPEXE) imachcyg-noreg-setup
239:
240: imachILC64-setup: IMaCh-ilc64.exe setup.iss
241: touch setup.iss.in
242: $(CP) IMaCh-ilc64.exe imach.exe
243: $(SETUPCOMP) /cc setup.iss
244: $(CP) Output/$(TMPSETUPEXE) imachILC64-setup
245:
246: imachILC64-noreg-setup: IMaCh-ilc64.exe noreg-setup.iss
247: touch setup.iss.in
248: $(CP) IMaCh-ilc64.exe imach.exe
249: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
250: $(CP) Output/$(TMPSETUPEXE) imachILC64-noreg-setup
251:
252: imachMVC-setup: imachMVC.exe setup.iss
253: touch setup.iss.in
254: $(CP) imachMVC.exe imach.exe
255: $(SETUPCOMP) /cc setup.iss
256: $(CP) Output/$(TMPSETUPEXE) imachcyg-setup
257:
258: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
259: imachMVC-noreg-setup: imachMVC.exe noreg-setup.iss
260: touch setup.iss.in
261: $(CP) imachMVC.exe imach.exe
262: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
263: $(CP) Output/$(TMPNOREGSETUPEXE) imachcyg-noreg-setup
264:
265: simach : simach.o
266: $(CC) $(LFLAGS) $(LGSL) -o simach simach.o
267: simach.o : simach.c
268: $(CC) $(CFLAGS) -DGSL -c simach.c
269:
270: imach : imach.o
271: $(CC) $(LFLAGS) -o imach imach.o
272: ifdef _macosx
273: $(DSYMUTIL) imach
274: endif
275:
276: imach.o : imach.c
277: $(CC) $(CFLAGS) -c imach.c
278:
279: # $(CC) $(CFLAGS) -DPOWELL -c imach.c
280:
281: # http://msdn.microsoft.com/en-us/library/abx4dbyh%28v=vs.100%29.aspx
282: imachcl: imach.c
283: cl /O2 /MT /o imach.exe imach.c
284:
285: imach097b : imach097b.o
286: $(CC) $(LFLAGS) -o imach097b imach097b.o
287: imach097b.o : imach097b.c
288: $(CC) $(CFLAGS) -DPOWELL -c imach097b.c
289:
290:
291: imachsimplified : imachsimplified.o
292: $(CC) $(LFLAGSOPT) -o imachsimplified imachsimplified.o
293: imachsimplified.o : imachsimplified.c
294: $(CC) $(CFLAGSOPT) -DPOWELL -c imachsimplified.c
295:
296: imachgsl : imachgsl.o
297: $(CC) -o imachgsl imach.o $(LFLAGS) $(LGSL)
298: imachgsl.o : imach.c
299: $(CC) $(CFLAGS) -DGSL $(IGSL) -c imach.c
300:
301: imachnlopt : imachnlopt.o
302: $(CC) -o imachnlopt imach.o $(LFLAGS) $(LNLOPT)
303: imachnlopt.o : imach.c
304: $(CC) $(CFLAGS) -DNLOPT $(INLOPT) -c imach.c
305:
306: imachopt : imachopt.o
307: $(CC) $(LFLAGSOPT) -o imachopt imachopt.o
308: ln -f imachopt imach
309: ifdef _macosx
310: $(STRIP) imach
311: cp imach ../bin
312: endif
313: ifdef _linux32onosx
314: $(CP) imachopt Output/imachopt$(VERSION)-$(BINVERSION)
315: cp -f imach ../bin
316: (cd .. && gnutar jcvf src/Output/imach-Linux-$(VERSION)-$(BINVERSION).tar.bz2 bin html/doc/biaspar.imach html/doc/data1.txt)
317: endif
318: ifdef _linux64onosx
319: $(CP) imachopt Output/imachopt$(VERSION)-$(BINVERSION)
320: cp -f imach ../bin
321: (cd .. && gnutar jcvf src/Output/imach-Linux-$(VERSION)-$(BINVERSION).tar.bz2 bin html/doc/biaspar.imach html/doc/data1.txt)
322: endif
323:
324: imachopt.o : imach.c
325: $(CC) $(CFLAGSOPT) -o imachopt.o -c imach.c
326:
327: # $(CC) $(CFLAGSOPT) -DPOWELL -o imachopt.o -c imach.c
328:
329: imachdmg : imachopt.o create-dmg applet IMaChInfo.plist.in IMaChPkgInfo.in IMaCh.icns main.scpt.in IMaCh-ecrandemarrage.rsrc TXT.rtf
330: $(CC) $(LFLAGSOPT) -o imach imachopt.o
331: #hdiutil detach /Volumes/IMaCh\ $(VERSION)
332: rm -rf imach$(VERSION).app
333: mkdir -p imach$(VERSION).app
334: mkdir -p imach$(VERSION).app/Contents
335: mkdir -p imach$(VERSION).app/Contents/MacOS
336: cp applet imach$(VERSION).app/Contents/MacOS
337: mkdir -p imach$(VERSION).app/Contents/Resources
338: mkdir -p imach$(VERSION).app/Contents/Resources/Scripts
339: mkdir -p imach$(VERSION).app/Contents/Resources/bin
340: mkdir -p imach$(VERSION).app/Contents/Resources/html
341: cp imach imach$(VERSION).app/Contents/Resources/bin
342: cp gnuplot_bin/gnuplot_2_6_5_OSX imach$(VERSION).app/Contents/Resources/bin/gnuplot
343: mkdir -p imach$(VERSION).app/Contents/Resources/description.rtfd
344: cp -p TXT.rtf imach$(VERSION).app/Contents/Resources/description.rtfd
345: $(SED) -e "s/@VERSION@/$(VERSION)/g;" \
346: IMaChInfo.plist.in >imach$(VERSION).app/Contents/Info.plist
347: cp -p IMaChPkgInfo.in imach$(VERSION).app/Contents/PkgInfo
348: cp -p IMaCh.icns imach$(VERSION).app/Contents/Resources/applet.icns
349: cp -r -p main.scpt.in imach$(VERSION).app/Contents/Resources/Scripts/main.scpt
350: cp IMaCH-ecrandemarrage.rsrc imach$(VERSION).app/Contents/Resources/applet.rsrc
351: cp ../html/doc/data1.txt imach$(VERSION).app/Contents/Resources/html
352: cp ../html/doc/biaspar.log imach$(VERSION).app/Contents/Resources/html
353: cp ../html/doc/biaspar.imach imach$(VERSION).app/Contents/Resources/html
354: rm -f imach$(VERSION).dmg
355: ./createdmg3.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
356: mv imach$(VERSION).dmg Output/
357: # ./create-dmg --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION).app
358: # ./createdmg2.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
359:
360: upload:
361: ls Output/* | xargs md5sum
362: rsync -v Output/* brouard@henry.ined.fr:/home/euroreves/html/imach/
363:
364: imachcyg : imachcyg.o
365: $(CC) $(LFLAGS) -o imach imachcyg.o
366: imachcyg.o : imach.c
367: $(CC) $(CFLAGS) -c -o imachcyg.o imach.c
368: imachcygopt.exe : imachcygopt.o
369: $(CC) $(LFLAGSOPT) -o imachcygopt.exe imachcygopt.o
370: imachcygopt.o : imach.c
371: $(CC) $(CFLAGSOPT) -c -o imachcygopt.o imach.c
372:
373: imachw32.o : imach.c
374: i386-mingw32-gcc -c imach.c -o imachw32.o
375: imach.exe : imachw32.o
376: i386-mingw32-gcc -mwindows -o imach.exe -lm imachw32.o
377: i386-mingw32-strip imach.exe
378:
379: valgrind-test : imach $(TESTFILE)
380: valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./imach $(TESTFILE)
381: test: imach $(TESTFILE)
382: gdb ./imach $(TESTFILE)
383:
384: $(PARAM).htm: imach $(PARAM).imach data1.txt
385: ./imach $(PARAM).imach
386:
387: clean:
388: rm or$(PARAM).txt er$(PARAM).txt pijr$(PARAM).txt plr$(PARAM).txt \
389: r$(PARAM).txt tr$(PARAM).txt vpl$(PARAM).txt pr$(PARAM).txt \
390: vr$(PARAM).txt *.gif imach.exe imach.o
391:
392:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>