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