[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_cdd

Annotation of OpenXM/src/ox_cdd/Makefile, Revision 1.8

1.8     ! ohara       1: # $OpenXM: OpenXM/src/ox_cdd/Makefile,v 1.7 2015/02/21 06:20:36 ohara Exp $
1.1       noro        2:
                      3: OpenXM_HOME=../..
                      4: OpenXM_LIBDIR=../../lib
1.8     ! ohara       5: OpenXM_LIB = -L$(OpenXM_LIBDIR) -lox -lgc -lgmp -lmpfr
1.1       noro        6: INCLUDES = -I$(OpenXM_HOME)/include
                      7: PREFIX=${OpenXM_HOME}
                      8: DISTDIR=${OpenXM_HOME}/../OpenXM_dist
                      9: RM = /bin/rm
1.7       ohara      10: MASTER_SITE=http://www.math.kobe-u.ac.jp/pub/OpenXM/misc/
1.3       noro       11: MVOL_TB=MixedVol.tar.gz
1.1       noro       12: CFLAGS = -g -Wall -finline-functions
1.3       noro       13: MVOLINCLUDE=work/MixedVol/SRC
1.1       noro       14:
                     15: GMPDEF = -DGMPRATIONAL
                     16:
1.5       ohara      17: CDD=cddlib-094d
                     18: CDDLIB_TB=$(CDD).tar.gz
1.1       noro       19: CDD_HOME= work/$(CDD)
                     20:
                     21: CDD_LIB = -lcdd
1.3       noro       22: CDDOBJ = ox_cdd.o cddlib.o
                     23: SRESOBJ = ox_sres.o cddlib.o mvol.o
                     24: LIBS = $(CDD_LIB) $(OpenXM_LIB) -lm
1.1       noro       25:
1.3       noro       26: CDDG_LIB = -lcddgmp
                     27: CDDOBJG = ox_cddgmp.o cddlibgmp.o
                     28: SRESOBJG = ox_sresgmp.o cddlibgmp.o mvol.o
                     29: LIBSG = $(CDDG_LIB) $(OpenXM_LIB) -lm
1.1       noro       30:
1.3       noro       31: PROG= ox_cdd ox_sres ox_cddgmp ox_sresgmp
1.1       noro       32:
                     33: all: build
                     34:
1.3       noro       35: components : libs $(PROG)
                     36:
                     37: ox_cdd: $(CDDOBJ)
                     38:        $(CC) $(CDDOBJ) $(LIBS) -o $@
1.1       noro       39:
1.3       noro       40: ox_cddgmp: $(CDDOBJG)
1.6       ohara      41:        $(CXX) $(CDDOBJG) $(LIBSG) -o $@
1.1       noro       42:
1.3       noro       43: ox_sres: $(SRESOBJ)
1.6       ohara      44:        $(CXX) $(SRESOBJ) $(LIBS) -o $@
1.3       noro       45:
                     46: ox_sresgmp: $(SRESOBJG)
1.6       ohara      47:        $(CXX) $(SRESOBJG) $(LIBSG) -o $@
1.1       noro       48:
                     49: ox_cdd.o : ox_cdd.c
                     50:        $(CC) $(CFLAGS) $(INCLUDES) -c $<
                     51:
                     52: ox_cddgmp.o : ox_cdd.c
1.5       ohara      53:        $(CC) -o ox_cddgmp.o $(CFLAGS) $(GMPDEF) $(INCLUDES) -c ox_cdd.c
1.1       noro       54:
1.3       noro       55: ox_sres.o : ox_sres.c
                     56:        $(CC) $(CFLAGS) $(INCLUDES) -c $<
                     57:
                     58: ox_sresgmp.o : ox_sres.c
1.5       ohara      59:        $(CC) -o ox_sresgmp.o $(CFLAGS) $(GMPDEF) $(INCLUDES) -c ox_sres.c
1.3       noro       60:
1.1       noro       61: cddlib.o : cddlib.c
                     62:        $(CC) $(CFLAGS) $(INCLUDES) -c $<
                     63:
                     64: cddlibgmp.o : cddlib.c
1.5       ohara      65:        $(CC) -o cddlibgmp.o  $(CFLAGS) $(GMPDEF) $(INCLUDES) -c cddlib.c
1.1       noro       66:
1.3       noro       67: mvol.o : mvol.cpp
1.6       ohara      68:        $(CXX) $(CFLAGS) -I$(MVOLINCLUDE) -c $<
1.3       noro       69:
1.1       noro       70: libs : ox gc libgmp cdd
                     71:
1.3       noro       72:
1.1       noro       73: ox :
                     74:        -@if test -f $(OpenXM_HOME)/lib/libox.a ; then \
                     75:                true ; \
                     76:        else \
                     77:                ( cd $(OpenXM_HOME)/src/ ; make install-oxtoolkit ) ; \
                     78:        fi
                     79:
                     80: gc :
                     81:        -@if test -f $(OpenXM_HOME)/lib/libgc.a ; then \
                     82:                true ; \
                     83:        else \
                     84:                ( cd $(OpenXM_HOME)/src/ ; make install-gc ) ; \
                     85:        fi
                     86:
                     87: libgmp :
                     88:        -@if test -f $(OpenXM_HOME)/lib/libgmp.a ; then \
                     89:                true ; \
                     90:        else \
                     91:                ( cd $(OpenXM_HOME)/src/ ; make install-gmp ) ; \
                     92:        fi
                     93:
                     94: cdd :
                     95:        -mkdir ${PREFIX}/bin ${PREFIX}/lib
                     96:        @if [ ! -f work/.install_done ]; then \
                     97:                (cd work/${CDD} ; ${MAKE} install) ; \
                     98:        fi
                     99:
                    100: clean:
                    101:
                    102: distclean: clean
                    103:        rm -f $(OpenXM_HOME)/lib/libox.a
                    104:        rm -f $(OpenXM_HOME)/lib/libgc.a
                    105:        rm -f $(CDD_HOME)/lib-src/libcdd.a
                    106:
                    107: fetch:
                    108:        -mkdir work
                    109:        @if [ ! -f work/.fetch_done ]; then \
1.3       noro      110:                ${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${CDDLIB_TB} ${DISTDIR}; \
                    111:                ${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${MVOL_TB} ${DISTDIR}; \
1.1       noro      112:        fi
                    113:        @touch work/.fetch_done
                    114:
                    115: extract: fetch
                    116:        @if [ ! -f work/.extract_done ]; then \
1.3       noro      117:            cat ${DISTDIR}/${CDDLIB_TB} | (cd work ; tar xzvf -) ; \
                    118:            cat ${DISTDIR}/${MVOL_TB} | (cd work ; tar xzvf -) ; \
1.1       noro      119:        fi
                    120:        @touch work/.extract_done
                    121:
                    122: patch: extract
1.4       noro      123:        @if [ ! -f work/.patch_done ]; then \
1.5       ohara     124:                cd work/${CDD}; patch -p0 < ../../cddlib.patch ; \
1.4       noro      125:        fi
1.1       noro      126:        @touch work/.patch_done
                    127:
                    128: configure: patch
                    129:        @if [ ! -f work/.configure_done ]; then \
                    130:                prefix=`cd ${OpenXM_HOME}; pwd` ; \
1.4       noro      131:                (cd work/${CDD} ; ./configure CXX=cc LDFLAGS=-L$$prefix/lib --prefix="$$prefix" ) ; \
1.1       noro      132:        fi
                    133:        @touch work/.configure_done
                    134:
                    135: build : configure components
                    136:
1.3       noro      137: install: build
                    138:        cp $(PROG) $(PROG) $(PREFIX)/bin
1.2       noro      139:        -mkdir $(PREFIX)/lib/asir
1.3       noro      140:        -for i in $(PROG); do \
                    141:                ln -s $(PREFIX)/bin/$$i $(PREFIX)/lib/asir ; \
                    142:        done
1.1       noro      143:        @touch work/.install_done
                    144:
                    145: clean:
                    146:        -$(RM) -rf work
1.3       noro      147:        -$(RM) -f $(PROG) *.o
1.1       noro      148:        -$(RM)  *.core
                    149:
                    150: distclean: clean

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