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