version 1.5, 2008/09/19 10:55:40 |
version 1.6, 2013/10/18 01:28:52 |
|
|
# $OpenXM: OpenXM/src/ox_ntl/Makefile.in,v 1.4 2004/07/11 00:32:17 iwane Exp $ |
# $OpenXM: OpenXM/src/ox_ntl/Makefile.in,v 1.5 2008/09/19 10:55:40 iwane Exp $ |
# @configure_input@ ### |
# @configure_input@ ### |
|
|
# |
# |
Line 47 LIBS=-lgmp -lox -lgc @LIBS@ |
|
Line 47 LIBS=-lgmp -lox -lgc @LIBS@ |
|
LDFLAGS=@LDFLAGS@ -L$(LIBDIR) -L$(NTL_LIBDIR) -L. |
LDFLAGS=@LDFLAGS@ -L$(LIBDIR) -L$(NTL_LIBDIR) -L. |
|
|
DISTDIR=$(OpenXM_HOME)/../OpenXM_dist |
DISTDIR=$(OpenXM_HOME)/../OpenXM_dist |
DISTFILEDIR=ntl-5.3.1 |
DISTFILEDIR=ntl-6.0.0 |
DISTFILE=ntl-5.3.1.tar.gz |
DISTFILE=ntl-6.0.0.tar.gz |
WORK=$(PWD)/work |
WORK=$(PWD)/work |
|
|
GMPOPT=NTL_GMP_LIP=on GMP_PREFIX=$(OpenXM_HOME) GMP_INCDIR=$(OpenXM_HOME)/include GMP_LIBDIR=$(OpenXM_HOME)/lib |
GMPOPT=NTL_GMP_LIP=on GMP_PREFIX=$(OpenXM_HOME) GMP_INCDIR=$(OpenXM_HOME)/include GMP_LIBDIR=$(OpenXM_HOME)/lib |
|
|
|
|
# lint |
# lint |
LINT=lint |
LINT=lint |
LINTFLAGS=-I$(PREFIX)/include |
LINTFLAGS=-I$(PREFIX)/include |
|
|
|
|
.SUFFIXES: .cpp .o .c |
.SUFFIXES: .cpp .o .c |
|
|
SRCC=oxserv.c oxstack.c |
SRCC=oxserv.c oxstack.c |
Line 70 OBJCP=$(SRCP:.cpp=.o) |
|
Line 68 OBJCP=$(SRCP:.cpp=.o) |
|
all: $(PROG) |
all: $(PROG) |
|
|
$(PROG): $(OBJCP) $(PROGL2) |
$(PROG): $(OBJCP) $(PROGL2) |
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJCP) -o $@ -l$(PROGL) -lntl |
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJCP) -o $@ -lntl -l$(PROGL) $(LIBS) |
|
|
$(PROGL2): $(OBJCC) |
$(PROGL2): $(OBJCC) |
$(CC) -shared $(LDFLAGS) $(OBJCC) -o $@ $(LIBS) |
$(CC) -shared $(LDFLAGS) $(OBJCC) -o $@ $(LIBS) |
|
|
$(CP) $(PROG) $(PREFIX)/bin |
$(CP) $(PROG) $(PREFIX)/bin |
$(CP) $(PROGL2) $(PREFIX)/lib |
$(CP) $(PROGL2) $(PREFIX)/lib |
|
|
|
install_lib: $(PROGL2) |
|
$(CP) $(PROGL2) $(PREFIX)/lib |
|
|
clean: |
clean: |
-$(RM) -f $(OBJC) $(OBJCC) $(OBJCP) |
-$(RM) -f $(OBJC) $(OBJCC) $(OBJCP) |
-$(RM) -f $(PROG) $(PROGL2) ox_ntl_debug oxserv_debug |
-$(RM) -f $(PROG) $(PROGL2) ox_ntl_debug oxserv_debug |
|
|
|
|
fetch-ntl: |
fetch-ntl: |
@if [ ! -f .fetch-ntl-done ]; then \ |
@if [ ! -f .fetch-ntl-done ]; then \ |
$(OpenXM_HOME)/bin/oxfetch.sh ftp://$(MASTER_CITES)/pub/OpenXM/misc/1.2.2/$(DISTFILE) $(DISTDIR); \ |
curl -L -o $(DISTDIR)/$(DISTFILE) http://www.shoup.net/ntl/$(DISTFILE) && \ |
touch .fetch-ntl-done; \ |
touch .fetch-ntl-done; \ |
fi |
fi |
|
|
extract-ntl: fetch-ntl |
extract-ntl: fetch-ntl |
-@mkdir -p $(WORK) |
-@mkdir -p $(WORK) |
@if [ ! -f .extract-ntl-done ]; then \ |
@if [ ! -f .extract-ntl-done ]; then \ |
(cd $(WORK); tar xvzf $(DISTDIR)/$(DISTFILE)); \ |
(cd $(WORK); tar xvzf $(DISTDIR)/$(DISTFILE)) && \ |
touch .extract-ntl-done; \ |
touch .extract-ntl-done; \ |
fi |
fi |
|
|
Line 131 build-ntl: patch-ntl |
|
Line 132 build-ntl: patch-ntl |
|
(cd $(WORK)/$(DISTFILEDIR)/src; \ |
(cd $(WORK)/$(DISTFILEDIR)/src; \ |
export LD_LIBRARY_PATH=$(OpenXM_HOME)/lib; \ |
export LD_LIBRARY_PATH=$(OpenXM_HOME)/lib; \ |
./configure LIBDIR=$(NTL_LIBDIR) PREFIX=$(PREFIX) $(GMPOPT); \ |
./configure LIBDIR=$(NTL_LIBDIR) PREFIX=$(PREFIX) $(GMPOPT); \ |
$(MAKE)); \ |
$(MAKE)) && \ |
touch .build-ntl-done; \ |
touch .build-ntl-done; \ |
fi |
fi |
|
|
install-ntl: build-ntl |
install-ntl: build-ntl |
@if [ ! -f .install-ntl-done ]; then \ |
@if [ ! -f .install-ntl-done ]; then \ |
(cd $(WORK)/$(DISTFILEDIR)/src; $(MAKE) install); \ |
(cd $(WORK)/$(DISTFILEDIR)/src; $(MAKE) install) && \ |
touch .install-ntl-done; \ |
touch .install-ntl-done; \ |
fi |
fi |
|
|
######################################### |
######################################### |
# DEBUG |
# DEBUG |
######################################### |
######################################### |
ox_ntl_debug: ntl.cpp ntl.h ntlconv.cpp |
ox_ntl_debug: ntl.cpp ntl.h ntlconv.cpp cmon.o |
$(CXX) $(CXXFLAGS) -g -D__NTL_DEBUG=1 -L/usr/local/lib -L$(LIBDIR) -L$(NTL_LIBDIR) ntl.cpp ntlconv.o -o $@ -lntl -lgmp -lox -lgc |
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -g -D__NTL_DEBUG=1 $(LDFLAGS) cmon.o ntl.cpp ntlconv.cpp -o $@ -lntl -l$(PROGL) $(LIBS) |
|
|
oxserv_debug: oxserv.h oxserv.c |
oxserv_debug: oxserv.h oxserv.c |
$(CC) $(CFLAGS) $(CPPFLAGS) -g -D__OXSERV_DEBUG=1 -L$(LIBDIR) oxserv.c oxstack.o -o $@ -lox -lgc |
$(CC) $(CFLAGS) $(CPPFLAGS) -g -D__OXSERV_DEBUG=1 $(LDFLAGS) oxserv.c oxstack.o -o $@ $(LIBS) |
|
|
|
|