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