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

Annotation of OpenXM/src/ox_ntl/Makefile, Revision 1.3

1.3     ! iwane       1: # $OpenXM: OpenXM/src/ox_ntl/Makefile,v 1.2 2003/11/03 22:06:09 ohara Exp $
1.1       iwane       2: #
                      3: #
                      4: #
                      5: #
                      6: # wget should be installed for install `NTL'
                      7: #
                      8:
                      9: PROG=ox_ntl
                     10:
                     11: CPP=g++
                     12: CC =gcc
                     13:
                     14: RM =/bin/rm
                     15: CP =/bin/cp
                     16:
                     17: CFLAGS=-I$(PREFIX)/include
                     18: CPPFLAGS=$(CFLAGS)
                     19:
                     20: PREFIX=$(OpenXM_HOME)
                     21:
                     22: MASTER_CITES=ftp.math.sci.kobe-u.ac.jp
                     23:
                     24: NTL_LIBDIR=$(PREFIX)/lib/NTL
                     25: LIBDIR=$(PREFIX)/lib
                     26:
                     27: DISTDIR=$(PWD)/distfile
                     28: DISTFILEDIR=ntl-5.3.1
                     29: DISTFILE=ntl-5.3.1.tar.gz
                     30: WORK=$(PWD)/work
                     31:
1.3     ! iwane      32: GMPOPT=NTL_GMP_LIP=on GMP_PREFIX=${OpenXM_HOME} GMP_INCDIR=${OpenXM_HOME}/include GMP_LIBDIR=${OpenXM_HOME}/lib
1.1       iwane      33:
                     34: .SUFFIXES: .cpp .o .c
                     35:
                     36: SRCC=oxserv.c
                     37: SRCP=main.cpp ntl.cpp
                     38:
                     39: OBJC=$(SRCC:.c=.o) $(SRCP:.cpp=.o)
                     40:
                     41:
                     42: all: $(PROG)
                     43:
                     44:
                     45: $(PROG): $(OBJC) $(LIBDIR)/libox.a $(NTL_LIBDIR)/libntl.a
                     46:        $(CPP) $(CPPFLAGS) -L$(LIBDIR) -L$(NTL_LIBDIR) $(OBJC) -o $@ -lntl -lgmp -lox -lgc
                     47:
                     48: oxserv.c: oxserv.h
                     49:
                     50: main.cpp: oxserv.h ntl.h
                     51:
                     52: ntl.cpp: ntl.h
                     53:
                     54: .cpp.o:
                     55:        $(CPP) $(CPPFLAGS) -c $< -o $@
                     56:
                     57: .c.o:
                     58:        $(CC) $(CFLAGS) -c $< -o $@
                     59:
                     60: install: all
                     61:        $(CP) $(PROG) $(PREFIX)/bin
                     62:
                     63: clean:
                     64:        -$(RM) -f $(OBJC) $(PROG)
                     65:        -$(RM) -fr ${WORK}
                     66:        -$(RM) -f .*-ntl-done
                     67:
                     68:
                     69: pre-fetch-ntl:
                     70:        @if [ ! -f .pre-fetch-ntl-done ]; then\
                     71:                mkdir -p ${DISTDIR} ${WORK}; \
                     72:                touch .pre-fetch-ntl-done; \
                     73:        fi
                     74:
                     75: fetch-ntl: pre-fetch-ntl
                     76:        @if [ ! -f .fetch-ntl-done ]; then \
1.2       ohara      77:                if [ ! -f ${DISTDIR}/${DISTFILE} ]; then \
                     78:                (cd ${DISTDIR}; wget --no-directories --passive-ftp ftp://$(MASTER_CITES)/pub/OpenXM/misc/1.2.2/$(DISTFILE)) ; \
                     79:                fi ; \
1.1       iwane      80:                (cd ${WORK}; tar xvzf ${DISTDIR}/${DISTFILE}); \
                     81:                touch .fetch-ntl-done; \
                     82:        fi
                     83:
                     84: patch-ntl: fetch-ntl
                     85:        @if [ ! -f .patch-ntl-done ]; then \
                     86:                touch .patch-ntl-done; \
                     87:        fi
1.2       ohara      88:
1.1       iwane      89:
                     90: build-ntl: patch-ntl
                     91:        @if [ ! -f .build-ntl-done ]; then \
1.3     ! iwane      92:                (cd ${WORK}/${DISTFILEDIR}/src; ./configure LIBDIR=${NTL_LIBDIR} PREFIX=${PREFIX} ${GMPOPT}; make); \
1.1       iwane      93:                touch .build-ntl-done; \
                     94:        fi
                     95:
                     96: install-ntl: build-ntl
                     97:        @if [ ! -f .install-ntl-done ]; then \
                     98:                (cd ${WORK}/${DISTFILEDIR}/src; make install); \
                     99:                touch .install-ntl-done; \
                    100:        fi
                    101:

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