Annotation of imach/src/Makefile, revision 1.36
1.36 ! brouard 1: VERSION=0.98nS
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
37: CFLAGS= -g -DUNIX
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
81: LFLAGS= -g
82: CFLAGS= -g
83: LFLAGSOPT= -O3
84: CFLAGSOPT= -O3
85: UNIX2DOS= unix2dos
86: SETUPCOMP= ~/bin/InnoSetup5Playonmac
1.32 brouard 87: CP= cp
1.31 brouard 88: endif
89:
1.21 brouard 90: ifdef _linux
1.26 brouard 91: #CFLAGS= -g -DUNIX -DDEBUGHESS
1.33 brouard 92: CFLAGS= -g -DUNIX -DLINUX
1.25 brouard 93: LFLAGS= -g -lm
1.30 brouard 94: IGSL= -I/usr/include/gsl
1.25 brouard 95: LGSL= -lgsl -lgslcblas
1.33 brouard 96: CFLAGSOPT= -O3 -DUNIX -DLINUX
1.21 brouard 97: LFLAGSOPT= -O3 -lm
98: UNIX2DOS= unix2dos
99: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
100: endif
101:
102: SED= sed
103: PACKAGE=imach
104: PROGRAM=IMaCh
105:
106:
107:
108: TMPSETUPSCRIPT=setup.iss
109: TMPNOREGSETUPSCRIPT=noreg-setup.iss
110: TMPSCRIPTIN=setup.iss.in
111: APPLICATION=IMaCh
112: APPNAME=$(APPLICATION)-$(VERSION)
113: GNUPLOTVERSION=4.0
114: LICENSE=Copying
115: TMPSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-setup.exe
1.31 brouard 116: TMPNOREGSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-noreg-setup.exe
1.21 brouard 117: LICENSEFILE=$(LICENSE)
118: INFOBEFOREFILE=README.txt
119:
1.31 brouard 120: setup.iss: setup.iss.in
1.21 brouard 121: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
122: s/@NOTINNOREG@//g; \
123: s/@NOREG@//g; \
124: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
125: s/@VERSION@/$(VERSION)/g; \
126: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
127: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
128: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
129: s/@PACKAGE@/$(PACKAGE)/g; \
130: s/@DICTLANG@/$(DICTLANG)/g; \
131: s/@VERMAJOR@/$(VERMAJOR)/g; \
132: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
1.31 brouard 133: setup.iss.in > setup.iss
1.21 brouard 134:
135: $(TMPNOREGSETUPSCRIPT): $(TMPSCRIPTIN)
136: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
137: s/@NOTINNOREG@/\\;/g; \
138: s/@NOREG@/noreg-/g; \
139: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
140: s/@VERSION@/$(VERSION)/g; \
141: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
142: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
143: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
144: s/@PACKAGE@/$(PACKAGE)/g; \
145: s/@DICTLANG@/$(DICTLANG)/g; \
146: s/@VERMAJOR@/$(VERMAJOR)/g; \
147: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
148: $(TMPSCRIPTIN) > $(TMPNOREGSETUPSCRIPT)
1.29 brouard 149: # $(UNIX2DOS) $(TMPNOREGSETUPSCRIPT)
1.21 brouard 150:
151: $(TMPSETUPEXE): $(TMPSETUPSCRIPT)
152: $(SETUPCOMP) /cc $(TMPSETUPSCRIPT)
153:
154: $(TMPNOREGSETUPEXE): $(TMPNOREGSETUPSCRIPT)
155: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
156:
157: PARAM=mypar1
158:
159: imachcyg-setup: imachcygopt.exe setup.iss
1.30 brouard 160: $(CP) imachcygopt.exe imach.exe
1.31 brouard 161: $(SETUPCOMP) /cc setup.iss
162: cp Output/$(TMPSETUPEXE) imachcyg-setup
1.21 brouard 163:
164: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
165: imachcyg-noreg-setup: imachcygopt.exe noreg-setup.iss
1.30 brouard 166: $(CP) imachcygopt.exe imach.exe
1.21 brouard 167: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
1.31 brouard 168: cp Output/$(TMPNOREGSETUPEXE) imachcyg-noreg-setup
1.21 brouard 169:
1.25 brouard 170: simach : simach.o
171: $(CC) $(LFLAGS) $(LGSL) -o simach simach.o
172: simach.o : simach.c
1.30 brouard 173: $(CC) $(CFLAGS) -DGSL -c simach.c
1.25 brouard 174:
1.21 brouard 175: imach : imach.o
176: $(CC) $(LFLAGS) -o imach imach.o
1.34 brouard 177: ifdef _macosx
178: $(DSYMUTIL) imach
179: endif
180:
1.21 brouard 181: imach.o : imach.c
1.30 brouard 182: $(CC) $(CFLAGS) -DPOWELL -c imach.c
1.32 brouard 183: imach-1.129cvsmac : imach-1.129cvsmac.o
184: $(CC) $(LFLAGS) -o imach-1.129cvsmac imach-1.129cvsmac.o
185: imach-1.129cvsmac.o : imach-1.129cvsmac.c
186: $(CC) $(CFLAGS) -DPOWELL -c imach-1.129cvsmac.c
187:
188: imach097b : imach097b.o
189: $(CC) $(LFLAGS) -o imach097b imach097b.o
190: imach097b.o : imach097b.c
191: $(CC) $(CFLAGS) -DPOWELL -c imach097b.c
1.30 brouard 192:
193:
194: imachsimplified : imachsimplified.o
195: $(CC) $(LFLAGSOPT) -o imachsimplified imachsimplified.o
196: imachsimplified.o : imachsimplified.c
197: $(CC) $(CFLAGSOPT) -DPOWELL -c imachsimplified.c
198:
199: imachgsl : imachgsl.o
200: $(CC) $(LFLAGS) $(LGSL) -o imachgsl imach.o
201: imachgsl.o : imach.c
202: $(CC) $(CFLAGS) -DGSL $(IGSL) -c imach.c
1.21 brouard 203:
204: imachopt : imachopt.o
205: $(CC) $(LFLAGSOPT) -o imachopt imachopt.o
206: ln -f imachopt imach
207: imachopt.o : imach.c
1.30 brouard 208: $(CC) $(CFLAGSOPT) -DPOWELL -o imachopt.o -c imach.c
1.21 brouard 209:
1.36 ! brouard 210: imachdmg : imachopt.o create-dmg applet IMaChInfo.plist.in IMaChPkgInfo.in IMaCh.icns main.scpt.in IMaCh-ecrandemarrage.rsrc TXT.rtf
1.27 brouard 211: $(CC) $(LFLAGSOPT) -o imach imachopt.o
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
! 220: cp imach imach$(VERSION).app/Contents/Resources/bin
! 221: mkdir -p imach$(VERSION).app/Contents/Resources/description.rtfd
! 222: cp -p TXT.rtf imach$(VERSION).app/Contents/Resources/description.rtfd
! 223: $(SED) -e "s/@VERSION@/$(VERSION)/g;" \
! 224: IMaChInfo.plist.in >imach$(VERSION).app/Contents/Info.plist
! 225: cp -p IMaChPkgInfo.in imach$(VERSION).app/Contents/PkgInfo
! 226: cp -p IMaCh.icns imach$(VERSION).app/Contents/Resources/applet.icns
! 227: cp -r -p main.scpt.in imach$(VERSION).app/Contents/Resources/Scripts/main.scpt
! 228: cp IMaCH-ecrandemarrage.rsrc imach$(VERSION).app/Contents/Resources/applet.rsrc
! 229: rm -f imach$(VERSION).dmg
! 230: ./createdmg2.sh --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION)
! 231: # ./create-dmg --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach$(VERSION).app
1.27 brouard 232:
233:
1.21 brouard 234: imachcyg : imachcyg.o strsep.o
235: $(CC) $(LFLAGS) -o imach imachcyg.o strsep.o
236: imachcyg.o : imach.c
237: $(CC) $(CFLAGS) -c -o imachcyg.o imach.c
238: imachcygopt.exe : imachcygopt.o strsep.o
239: $(CC) $(LFLAGSOPT) -o imachcygopt.exe imachcygopt.o strsep.o
240: imachcygopt.o : imach.c
241: $(CC) $(CFLAGSOPT) -c -o imachcygopt.o imach.c
242: strsep.o : strsep.c
243: $(CC) $(CFLAGSOPT) -c -o strsep.o strsep.c
244:
245: imachw32.o : imach.c
246: i386-mingw32-gcc -c imach.c -o imachw32.o
247: imach.exe : imachw32.o
248: i386-mingw32-gcc -mwindows -o imach.exe -lm imachw32.o
249: i386-mingw32-strip imach.exe
250:
1.34 brouard 251: valgrind-test : imach $(TESTFILE)
252: valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./imach $(TESTFILE)
253: test: imach $(TESTFILE)
254: gdb ./imach $(TESTFILE)
1.21 brouard 255:
256: $(PARAM).htm: imach $(PARAM).imach data1.txt
257: ./imach $(PARAM).imach
258:
259: clean:
260: rm or$(PARAM).txt er$(PARAM).txt pijr$(PARAM).txt plr$(PARAM).txt \
261: r$(PARAM).txt tr$(PARAM).txt vpl$(PARAM).txt pr$(PARAM).txt \
262: vr$(PARAM).txt *.gif imach.exe imach.o
263:
264:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>