File:  [Local Repository] / imach / src / Makefile
Revision 1.47: download - view: text, annotated - select for diffs
Thu Sep 25 11:42:54 2014 UTC (10 years, 1 month ago) by brouard
Branches: MAIN
CVS tags: HEAD
Summary: backuup

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>