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