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

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

1.9     ! iwane       1: # $OpenXM: OpenXM/src/ox_ntl/Makefile,v 1.8 2003/11/15 09:06:20 iwane Exp $
1.1       iwane       2: #
                      3: #
                      4: #
                      5: #
                      6: # wget should be installed for install `NTL'
                      7: #
                      8:
                      9: PROG=ox_ntl
                     10:
1.6       iwane      11: OpenXM_HOME=${PWD}/../..
1.5       iwane      12:
1.1       iwane      13: CPP=g++
                     14: CC =gcc
                     15:
                     16: RM =/bin/rm
                     17: CP =/bin/cp
                     18:
1.8       iwane      19: CFLAGS=-I$(PREFIX)/include -g
1.1       iwane      20: CPPFLAGS=$(CFLAGS)
                     21:
1.8       iwane      22: # WITH_GMP        <== for ox_toolkit --      include "gmp.h"
                     23: # __GMP_FALE_H__  <==                -- dont include "gmp_fake.h"
                     24: DEFS=-DWITH_GMP=1 -D__GMP_FAKE_H__
                     25:
1.1       iwane      26: PREFIX=$(OpenXM_HOME)
                     27:
                     28: MASTER_CITES=ftp.math.sci.kobe-u.ac.jp
                     29:
                     30: NTL_LIBDIR=$(PREFIX)/lib/NTL
                     31: LIBDIR=$(PREFIX)/lib
                     32:
1.7       ohara      33: DISTDIR=${OpenXM_HOME}/../OpenXM_dist
1.1       iwane      34: DISTFILEDIR=ntl-5.3.1
                     35: DISTFILE=ntl-5.3.1.tar.gz
                     36: WORK=$(PWD)/work
                     37:
1.3       iwane      38: GMPOPT=NTL_GMP_LIP=on GMP_PREFIX=${OpenXM_HOME} GMP_INCDIR=${OpenXM_HOME}/include GMP_LIBDIR=${OpenXM_HOME}/lib
1.1       iwane      39:
                     40: .SUFFIXES: .cpp .o .c
                     41:
1.4       iwane      42: SRCC=oxserv.c oxstack.c
1.8       iwane      43: SRCP=main.cpp ntl.cpp ntlconv.cpp cmon.cpp
1.1       iwane      44:
                     45: OBJC=$(SRCC:.c=.o) $(SRCP:.cpp=.o)
                     46:
                     47:
                     48: all: $(PROG)
                     49:
                     50:
                     51: $(PROG): $(OBJC) $(LIBDIR)/libox.a $(NTL_LIBDIR)/libntl.a
1.8       iwane      52:        $(CPP) $(CPPFLAGS) -L$(LIBDIR) -L$(NTL_LIBDIR) $(OBJC) -o $@ -lntl -lgmp -lox -lgc ${LIBS}
1.1       iwane      53:
                     54:
1.4       iwane      55: oxserv.c: oxserv.h oxstack.h
                     56:
                     57: oxstack.c: oxstack.h
                     58:
                     59: main.cpp: oxserv.h ntl.h oxstack.h
1.1       iwane      60:
1.9     ! iwane      61: cmon.cpp: ntl.h
        !            62:
1.1       iwane      63: ntl.cpp: ntl.h
                     64:
1.9     ! iwane      65: ntlconv.cpp: ntl.h
        !            66:
1.1       iwane      67: .cpp.o:
1.8       iwane      68:        $(CPP) $(CPPFLAGS) $(DEFS) -c $< -o $@
1.1       iwane      69:
                     70: .c.o:
1.8       iwane      71:        $(CC) $(CFLAGS) $(DEFS) -c $< -o $@
1.1       iwane      72:
                     73: install: all
                     74:        $(CP) $(PROG) $(PREFIX)/bin
                     75:
                     76: clean:
1.4       iwane      77:        -$(RM) -f $(OBJC) $(PROG) ox_ntl_debug oxserv_debug
1.1       iwane      78:        -$(RM) -fr ${WORK}
1.9     ! iwane      79:
        !            80: distclean:
        !            81:        -$(RM) -f .*-ntl-done
1.1       iwane      82:
                     83:
1.7       ohara      84: fetch-ntl:
                     85:        @if [ ! -f .fetch-ntl-done ]; then \
                     86:                ${OpenXM_HOME}/bin/oxfetch.sh ftp://${MASTER_CITES}/pub/OpenXM/misc/1.2.2/${DISTFILE} ${DISTDIR}; \
                     87:                touch .fetch-ntl-done; \
1.1       iwane      88:        fi
                     89:
1.7       ohara      90: extract-ntl: fetch-ntl
1.8       iwane      91:        -mkdir ${WORK}
1.7       ohara      92:        @if [ ! -f .extract-ntl-done ]; then \
1.1       iwane      93:                (cd ${WORK}; tar xvzf ${DISTDIR}/${DISTFILE}); \
1.7       ohara      94:                touch .extract-ntl-done; \
1.1       iwane      95:        fi
                     96:
1.7       ohara      97: patch-ntl: extract-ntl
1.1       iwane      98:        @if [ ! -f .patch-ntl-done ]; then \
                     99:                touch .patch-ntl-done; \
                    100:        fi
1.2       ohara     101:
1.1       iwane     102:
                    103: build-ntl: patch-ntl
                    104:        @if [ ! -f .build-ntl-done ]; then \
1.6       iwane     105:                (cd ${WORK}/${DISTFILEDIR}/src; \
                    106:                 LD_LIBRARY_PATH=${OpenXM_HOME}/lib; \
                    107:                 export LD_LIBRARY_PATH; \
1.9     ! iwane     108:                 ./configure LIBDIR=${NTL_LIBDIR} PREFIX=${PREFIX} ${GMPOPT};   \
1.8       iwane     109:                 make); \
1.1       iwane     110:                touch .build-ntl-done; \
                    111:        fi
                    112:
                    113: install-ntl: build-ntl
                    114:        @if [ ! -f .install-ntl-done ]; then \
                    115:                (cd ${WORK}/${DISTFILEDIR}/src; make install); \
                    116:                touch .install-ntl-done; \
                    117:        fi
1.9     ! iwane     118:
        !           119: #########################################
        !           120: # DEBUG
        !           121: #########################################
        !           122: ox_ntl_debug: ntl.cpp ntl.h ntlconv.cpp oxserv.h
        !           123:        $(CPP) $(CPPFLAGS) -g -D__NTL_DEBUG=1 -L/usr/local/lib -L$(LIBDIR) -L$(NTL_LIBDIR) $(DEFS) ntl.cpp ntlconv.o cmon.o oxserv.o oxstack.o -o $@ -lntl -lgmp -lox -lgc
        !           124:
        !           125: oxserv_debug: oxserv.h oxserv.c
        !           126:        $(CC) $(CFLAGS) -g -D__OXSERV_DEBUG=1 -L$(LIBDIR) $(DEFS) oxserv.c oxstack.o -o $@ -lgmp -lox -lgc
        !           127:
1.1       iwane     128:

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