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

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

1.2     ! noro        1: # $OpenXM: OpenXM/src/ox_cdd/Makefile,v 1.1 2005/05/25 04:42:20 noro Exp $
1.1       noro        2:
                      3: OpenXM_HOME=../..
                      4: OpenXM_LIBDIR=../../lib
                      5: OpenXM_LIB = -L$(OpenXM_LIBDIR) -lox -lgc -lgmp
                      6: INCLUDES = -I$(OpenXM_HOME)/include
                      7: PREFIX=${OpenXM_HOME}
                      8: DISTDIR=${OpenXM_HOME}/../OpenXM_dist
                      9: RM = /bin/rm
                     10: MASTER_SITE=ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/misc/
                     11: DISTFILES=cddlib-093d.tar.gz
                     12: CFLAGS = -g -Wall -finline-functions
                     13:
                     14: GMPDEF = -DGMPRATIONAL
                     15:
                     16: CDD=cddlib-093d
                     17: CDD_HOME= work/$(CDD)
                     18:
                     19: CDD_LIB = -lcdd
                     20: OBJ = ox_cdd.o cddlib.o
                     21: PROG = ox_cdd
                     22:
                     23: CDDGMP_LIB = -lcddgmp
                     24: OBJGMP = ox_cddgmp.o cddlibgmp.o
                     25: PROGGMP = ox_cddgmp
                     26:
                     27: LIBS = $(CDD_LIB) $(OpenXM_LIB) -lm
                     28: LIBSGMP = $(CDDGMP_LIB) $(OpenXM_LIB) -lm
                     29:
                     30: all: build
                     31:
                     32: components : libs $(PROG) $(PROGGMP)
                     33:
                     34: $(PROG): $(OBJ)
                     35:        $(CC) $(OBJ) $(LIBS) -o $@
                     36:
                     37: $(PROGGMP): $(OBJGMP)
                     38:        g++ $(OBJGMP) $(LIBSGMP) -o $@
                     39:
                     40: ox_cdd.o : ox_cdd.c
                     41:        $(CC) $(CFLAGS) $(INCLUDES) -c $<
                     42:
                     43: ox_cddgmp.o : ox_cdd.c
                     44:        $(CC) -o ox_cddgmp.o $(CFLAGS) $(GMPDEF) $(INCLUDES) -c $<
                     45:
                     46: cddlib.o : cddlib.c
                     47:        $(CC) $(CFLAGS) $(INCLUDES) -c $<
                     48:
                     49: cddlibgmp.o : cddlib.c
                     50:        $(CC) -o cddlibgmp.o  $(CFLAGS) $(GMPDEF) $(INCLUDES) -c $<
                     51:
                     52: libs : ox gc libgmp cdd
                     53:
                     54: ox :
                     55:        -@if test -f $(OpenXM_HOME)/lib/libox.a ; then \
                     56:                true ; \
                     57:        else \
                     58:                ( cd $(OpenXM_HOME)/src/ ; make install-oxtoolkit ) ; \
                     59:        fi
                     60:
                     61: gc :
                     62:        -@if test -f $(OpenXM_HOME)/lib/libgc.a ; then \
                     63:                true ; \
                     64:        else \
                     65:                ( cd $(OpenXM_HOME)/src/ ; make install-gc ) ; \
                     66:        fi
                     67:
                     68: libgmp :
                     69:        -@if test -f $(OpenXM_HOME)/lib/libgmp.a ; then \
                     70:                true ; \
                     71:        else \
                     72:                ( cd $(OpenXM_HOME)/src/ ; make install-gmp ) ; \
                     73:        fi
                     74:
                     75: cdd :
                     76:        -mkdir ${PREFIX}/bin ${PREFIX}/lib
                     77:        @if [ ! -f work/.install_done ]; then \
                     78:                (cd work/${CDD} ; ${MAKE} install) ; \
                     79:        fi
                     80:
                     81: clean:
                     82:
                     83: distclean: clean
                     84:        rm -f $(OpenXM_HOME)/lib/libox.a
                     85:        rm -f $(OpenXM_HOME)/lib/libgc.a
                     86:        rm -f $(CDD_HOME)/lib-src/libcdd.a
                     87:
                     88: fetch:
                     89:        -mkdir work
                     90:        @if [ ! -f work/.fetch_done ]; then \
                     91:                ${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${DISTFILES} ${DISTDIR}; \
                     92:        fi
                     93:        @touch work/.fetch_done
                     94:
                     95: extract: fetch
                     96:        @if [ ! -f work/.extract_done ]; then \
                     97:            cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xzvf -) ; \
                     98:        fi
                     99:        @touch work/.extract_done
                    100:
                    101: patch: extract
                    102:        @touch work/.patch_done
                    103:
                    104: configure: patch
                    105:        @if [ ! -f work/.configure_done ]; then \
                    106:                prefix=`cd ${OpenXM_HOME}; pwd` ; \
                    107:                (cd work/${CDD} ; ./configure CXX=cc --prefix="$$prefix" ) ; \
                    108:        fi
                    109:        @touch work/.configure_done
                    110:
                    111: build : configure components
                    112:
                    113: install:
1.2     ! noro      114:        cp $(PROG) $(PROGGMP) $(PREFIX)/bin
        !           115:        -mkdir $(PREFIX)/lib/asir
        !           116:        -ln -s $(PREFIX)/bin/$(PROG) $(PREFIX)/bin/$(PROGGMP) $(PREFIX)/lib/asir
1.1       noro      117:        @touch work/.install_done
                    118:
                    119: clean:
                    120:        -$(RM) -rf work
                    121:        -$(RM) -f $(PROG) $(PROGGMP) $(OBJ) $(OBJGMP)
                    122:        -$(RM)  *.core
                    123:
                    124: distclean: clean

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