Annotation of imach/src/Makefile, revision 1.40
1.39 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.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.21 brouard 12:
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
18: # make _windows=1 imachcyg
1.23 lievre 19: # make _windows=1 imachcyg-setup (touch setup.iss.in)
20: # make _windows=1 imachcyg-noreg-setup
1.31 brouard 21: #
22: # make _windowsonlinux=1 imachcyg-setup (touch setup.iss.in)
23: # make _windowsonlinux=1 imachcyg-noreg-setup
24: #
1.40 ! brouard 25:
1.31 brouard 26: #
1.21 brouard 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"
1.36 brouard 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
1.34 brouard 32: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc-test-mac/adecode-1.142c.imach
1.35 brouard 33: #TESTFILE=$(HOME)/Documents/Recherches/REVES/SAITO/Tokyo2014/adlc_test_magei4/radlc_often.imach
1.21 brouard 34: #CC= gcc -v
1.28 brouard 35: CC=$(GCC)
36: GCC= gcc
1.21 brouard 37:
38: ifdef _macosx
39: # Mac OS/X version
1.31 brouard 40: LFLAGS= -g -lm -DUNIX
1.37 brouard 41: CFLAGS= -g -DUNIX -DOSX
1.31 brouard 42: LFLAGSOPT= -O3 -lm -DUNIX
43: CFLAGSOPT= -O3 -DUNIX
1.21 brouard 44: UNIX2DOS= echo "Unix2dos "
1.34 brouard 45: DSYMUTIL= dsymutil
1.21 brouard 46: # Don'know how to launch imach098.pmsp in batch to create package file imach098Panther.pkg
47: # ./createdmg.sh imach imach098panther ./imach098Panther
1.27 brouard 48: # ./createdmg.sh imach imach098leopard ./imach098Leopard
1.21 brouard 49: # and directory ./imach098Panther contains package file imach098Panther.pkg
1.27 brouard 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
1.21 brouard 52: endif
53:
54: ifdef _windows
1.29 brouard 55: CC=c:\MinGW\bin\Mingw32-gcc
56:
1.21 brouard 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
1.30 brouard 63: CP= copy
1.29 brouard 64: #SETUPCOMP= Compil32
1.21 brouard 65: ##SETUPCOMP=start /wait "C:\Program\ Files\\Compil32.exe"
1.29 brouard 66: # cygwin SETUPCOMP= "C:\Program Files\Inno Setup 4\Compil32.exe"
67: SETUPCOMP= "C:////Program Files////Inno Setup 4////Compil32.exe"
1.21 brouard 68: endif
69:
1.28 brouard 70: ifdef _windowsonlinux
71: GCC=/usr/bin/i586-pc-mingw32-gcc
72: LFLAGS= -g
73: CFLAGS= -g
1.30 brouard 74: LFLAGSOPT= -O3 -lm
1.28 brouard 75: CFLAGSOPT= -O3
1.30 brouard 76: CP= cp
1.28 brouard 77: UNIX2DOS= unix2dos
78: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
79: endif
80:
1.31 brouard 81: ifdef _windowsonosx
1.40 ! brouard 82: #GCC=/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc
1.31 brouard 83: # w64 outputs bigger executables
84: #GCC=/usr/local/cross-tools/bin/i686-w64-mingw32-gcc
1.38 brouard 85: 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 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
1.31 brouard 114: LFLAGS= -g
115: CFLAGS= -g
1.40 ! brouard 116: LFLAGSOPT= -O3 -s -lm
1.31 brouard 117: CFLAGSOPT= -O3
118: UNIX2DOS= unix2dos
119: SETUPCOMP= ~/bin/InnoSetup5Playonmac
1.32 brouard 120: CP= cp
1.31 brouard 121: endif
122:
1.21 brouard 123: ifdef _linux
1.26 brouard 124: #CFLAGS= -g -DUNIX -DDEBUGHESS
1.33 brouard 125: CFLAGS= -g -DUNIX -DLINUX
1.25 brouard 126: LFLAGS= -g -lm
1.30 brouard 127: IGSL= -I/usr/include/gsl
1.25 brouard 128: LGSL= -lgsl -lgslcblas
1.33 brouard 129: CFLAGSOPT= -O3 -DUNIX -DLINUX
1.21 brouard 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
1.31 brouard 149: TMPNOREGSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-noreg-setup.exe
1.21 brouard 150: LICENSEFILE=$(LICENSE)
151: INFOBEFOREFILE=README.txt
152:
1.31 brouard 153: setup.iss: setup.iss.in
1.21 brouard 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;" \
1.31 brouard 166: setup.iss.in > setup.iss
1.21 brouard 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)
1.29 brouard 182: # $(UNIX2DOS) $(TMPNOREGSETUPSCRIPT)
1.21 brouard 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
1.38 brouard 193: touch setup.iss.in
1.30 brouard 194: $(CP) imachcygopt.exe imach.exe
1.31 brouard 195: $(SETUPCOMP) /cc setup.iss
196: cp Output/$(TMPSETUPEXE) imachcyg-setup
1.21 brouard 197:
198: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
199: imachcyg-noreg-setup: imachcygopt.exe noreg-setup.iss
1.38 brouard 200: touch setup.iss.in
1.30 brouard 201: $(CP) imachcygopt.exe imach.exe
1.21 brouard 202: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
1.31 brouard 203: cp Output/$(TMPNOREGSETUPEXE) imachcyg-noreg-setup
1.21 brouard 204:
1.25 brouard 205: simach : simach.o
206: $(CC) $(LFLAGS) $(LGSL) -o simach simach.o
207: simach.o : simach.c
1.30 brouard 208: $(CC) $(CFLAGS) -DGSL -c simach.c
1.25 brouard 209:
1.21 brouard 210: imach : imach.o
211: $(CC) $(LFLAGS) -o imach imach.o
1.34 brouard 212: ifdef _macosx
213: $(DSYMUTIL) imach
214: endif
215:
1.21 brouard 216: imach.o : imach.c
1.30 brouard 217: $(CC) $(CFLAGS) -DPOWELL -c imach.c
1.32 brouard 218:
219: imach097b : imach097b.o
220: $(CC) $(LFLAGS) -o imach097b imach097b.o
221: imach097b.o : imach097b.c
222: $(CC) $(CFLAGS) -DPOWELL -c imach097b.c
1.30 brouard 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
1.21 brouard 234:
235: imachopt : imachopt.o
236: $(CC) $(LFLAGSOPT) -o imachopt imachopt.o
237: ln -f imachopt imach
238: imachopt.o : imach.c
1.30 brouard 239: $(CC) $(CFLAGSOPT) -DPOWELL -o imachopt.o -c imach.c
1.21 brouard 240:
1.36 brouard 241: imachdmg : imachopt.o create-dmg applet IMaChInfo.plist.in IMaChPkgInfo.in IMaCh.icns main.scpt.in IMaCh-ecrandemarrage.rsrc TXT.rtf
1.27 brouard 242: $(CC) $(LFLAGSOPT) -o imach imachopt.o
1.37 brouard 243: #hdiutil detach /Volumes/IMaCh\ $(VERSION)
1.36 brouard 244: rm -rf imach$(VERSION).app
245: mkdir -p imach$(VERSION).app
246: mkdir -p imach$(VERSION).app/Contents
247: mkdir -p imach$(VERSION).app/Contents/MacOS
248: cp applet imach$(VERSION).app/Contents/MacOS
249: mkdir -p imach$(VERSION).app/Contents/Resources
250: mkdir -p imach$(VERSION).app/Contents/Resources/Scripts
251: mkdir -p imach$(VERSION).app/Contents/Resources/bin
1.38 brouard 252: mkdir -p imach$(VERSION).app/Contents/Resources/html
1.36 brouard 253: cp imach imach$(VERSION).app/Contents/Resources/bin
1.37 brouard 254: cp gnuplot_bin/gnuplot_2_6_5_OSX imach$(VERSION).app/Contents/Resources/bin/gnuplot
1.36 brouard 255: mkdir -p imach$(VERSION).app/Contents/Resources/description.rtfd
256: cp -p TXT.rtf imach$(VERSION).app/Contents/Resources/description.rtfd
257: $(SED) -e "s/@VERSION@/$(VERSION)/g;" \
258: IMaChInfo.plist.in >imach$(VERSION).app/Contents/Info.plist
259: cp -p IMaChPkgInfo.in imach$(VERSION).app/Contents/PkgInfo
260: cp -p IMaCh.icns imach$(VERSION).app/Contents/Resources/applet.icns
261: cp -r -p main.scpt.in imach$(VERSION).app/Contents/Resources/Scripts/main.scpt
262: cp IMaCH-ecrandemarrage.rsrc imach$(VERSION).app/Contents/Resources/applet.rsrc
1.38 brouard 263: cp ../html/doc/data1.txt imach$(VERSION).app/Contents/Resources/html
264: cp ../html/doc/biaspar.log imach$(VERSION).app/Contents/Resources/html
265: cp ../html/doc/biaspar.imach imach$(VERSION).app/Contents/Resources/html
1.36 brouard 266: rm -f imach$(VERSION).dmg
1.38 brouard 267: ./createdmg3.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
268: mv imach$(VERSION).dmg Output/
1.36 brouard 269: # ./create-dmg --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION).app
1.38 brouard 270: # ./createdmg2.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
1.27 brouard 271:
1.38 brouard 272: upload:
273: ls Output/* | xargs md5sum
274: rsync -v Output/* brouard@henry.ined.fr:/home/euroreves/html/imach/
1.27 brouard 275:
1.21 brouard 276: imachcyg : imachcyg.o strsep.o
277: $(CC) $(LFLAGS) -o imach imachcyg.o strsep.o
278: imachcyg.o : imach.c
279: $(CC) $(CFLAGS) -c -o imachcyg.o imach.c
280: imachcygopt.exe : imachcygopt.o strsep.o
281: $(CC) $(LFLAGSOPT) -o imachcygopt.exe imachcygopt.o strsep.o
282: imachcygopt.o : imach.c
283: $(CC) $(CFLAGSOPT) -c -o imachcygopt.o imach.c
284: strsep.o : strsep.c
285: $(CC) $(CFLAGSOPT) -c -o strsep.o strsep.c
286:
287: imachw32.o : imach.c
288: i386-mingw32-gcc -c imach.c -o imachw32.o
289: imach.exe : imachw32.o
290: i386-mingw32-gcc -mwindows -o imach.exe -lm imachw32.o
291: i386-mingw32-strip imach.exe
292:
1.34 brouard 293: valgrind-test : imach $(TESTFILE)
294: valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./imach $(TESTFILE)
295: test: imach $(TESTFILE)
296: gdb ./imach $(TESTFILE)
1.21 brouard 297:
298: $(PARAM).htm: imach $(PARAM).imach data1.txt
299: ./imach $(PARAM).imach
300:
301: clean:
302: rm or$(PARAM).txt er$(PARAM).txt pijr$(PARAM).txt plr$(PARAM).txt \
303: r$(PARAM).txt tr$(PARAM).txt vpl$(PARAM).txt pr$(PARAM).txt \
304: vr$(PARAM).txt *.gif imach.exe imach.o
305:
306:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>