1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Makefile for MP library |
---|
4 | ### |
---|
5 | ################################################################# |
---|
6 | |
---|
7 | SHELL = /bin/sh |
---|
8 | |
---|
9 | ## |
---|
10 | ## versions |
---|
11 | ## |
---|
12 | PRODUCT = @PRODUCT@ |
---|
13 | VERSION = @VERSION@ |
---|
14 | |
---|
15 | ## |
---|
16 | ## various paths |
---|
17 | ## |
---|
18 | top_srcdir = @top_srcdir@ |
---|
19 | prefix = @prefix@ |
---|
20 | exec_prefix = @exec_prefix@ |
---|
21 | # header file is installed here |
---|
22 | includedir = @includedir@ |
---|
23 | # library is installed here |
---|
24 | libdir = @libdir@ |
---|
25 | # header files reside here |
---|
26 | hdir = h |
---|
27 | |
---|
28 | ## |
---|
29 | ## various programs |
---|
30 | ## |
---|
31 | @SET_MAKE@ |
---|
32 | CLEAN = @CLEAN@ |
---|
33 | CC = @CC@ |
---|
34 | AR = @AR@ |
---|
35 | RANLIB = ranlib |
---|
36 | RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ] |
---|
37 | INSTALL = ../install-sh -c |
---|
38 | INSTALL_PROGRAM = ${INSTALL} |
---|
39 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
40 | MKINSTALLDIRS = ../mkinstalldirs |
---|
41 | |
---|
42 | ## |
---|
43 | ## compiler and linker options |
---|
44 | ## |
---|
45 | CFLAGS = @CFLAGS@ |
---|
46 | CPPFLAGS = -I. @CPPFLAGS@ |
---|
47 | DEFS = @DEFS@ |
---|
48 | |
---|
49 | ## |
---|
50 | ## End configuration dependend stuff |
---|
51 | ################################################################# |
---|
52 | |
---|
53 | ## |
---|
54 | ## file sets |
---|
55 | ## |
---|
56 | |
---|
57 | SRCS = MP_Link.c MP_Put.c MP_Get.c MP_Error.c MP_Util.c MP_Annotations.c \ |
---|
58 | MP_Vector.c MP_Env.c MP_FileTransp.c MP_TcpTransp.c \ |
---|
59 | MP_Buffer.c MP_BigNum.c Memory.c \ |
---|
60 | MP_GmpBigInt.c MP_GmpBigReal.c MP_PariBigInt.c \ |
---|
61 | MP_SacBigInt.c MP_TbTransp.c MP_PvmTransp.c |
---|
62 | |
---|
63 | OBJS= MP_Link.o MP_Put.o MP_Get.o MP_Error.o MP_Util.o MP_Annotations.o \ |
---|
64 | MP_Vector.o MP_Env.o MP_FileTransp.o MP_TcpTransp.o \ |
---|
65 | MP_Buffer.o MP_BigNum.o MP_Memory.o \ |
---|
66 | MP_GmpBigInt.o MP_GmpBigReal.o MP_PariBigInt.o \ |
---|
67 | MP_SacBigInt.o MP_TbTransp.o MP_PvmTransp.o |
---|
68 | |
---|
69 | HEADERS= ${hdir}/MP.h ${hdir}/MP_FileTransp.h ${hdir}/MP_ProtoDict.h \ |
---|
70 | ${hdir}/MP_Get.h ${hdir}/MP_Put.h ${hdir}/MP_GmpBigInt.h \ |
---|
71 | ${hdir}/MP_GmpBigReal.h ${hdir}/MP_PvmTransp.h ${hdir}/MP_SacBigInt.h\ |
---|
72 | ${hdir}/MP_Annotations.h ${hdir}/MP_Link.h ${hdir}/MP_TbTransp.h \ |
---|
73 | ${hdir}/MP_BasicDict.h ${hdir}/MP_MatrixDict.h ${hdir}/MP_TcpTransp.h\ |
---|
74 | ${hdir}/MP_BigNum.h ${hdir}/MP_Memory.h ${hdir}/MP_PolyDict.h \ |
---|
75 | ${hdir}/MP_Types.h ${hdir}/MP_BuffTypes.h ${hdir}/MP_MpDict.h \ |
---|
76 | ${hdir}/MP_Util.h ${hdir}/MP_Buffer.h ${hdir}/MP_NumberDict.h \ |
---|
77 | ${hdir}/MP_Vector.h ${hdir}/MP_Env.h ${hdir}/MP_PariBigInt.h \ |
---|
78 | ${hdir}/MP_Error.h |
---|
79 | |
---|
80 | DISTFILES=${HEADERS} ${SOURCES} ${hdir}/MP_Config.h.in Makefile.in \ |
---|
81 | makeheader.pl MP.h |
---|
82 | |
---|
83 | .SUFFIXES: |
---|
84 | .SUFFIXES: .c .o |
---|
85 | .c.o: |
---|
86 | $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< |
---|
87 | |
---|
88 | all: libMP.a |
---|
89 | |
---|
90 | libMP.a: MP.h MP_Config.h Makefile $(OBJS) |
---|
91 | rm -f $@ |
---|
92 | $(AR) cr $@ $(OBJS) |
---|
93 | if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi |
---|
94 | # $(RANLIB) $@ |
---|
95 | |
---|
96 | install: libMP.a |
---|
97 | ${MKINSTALLDIRS} ${libdir} |
---|
98 | ${MKINSTALLDIRS} ${includedir} |
---|
99 | $(INSTALL_DATA) libMP.a $(libdir) |
---|
100 | if $(RANLIB_TEST) ; then $(RANLIB) $(libdir)/libMP.a; else true; fi |
---|
101 | $(INSTALL_DATA) MP.h $(includedir) |
---|
102 | $(INSTALL_DATA) mp_gmp.h $(includedir) |
---|
103 | $(INSTALL_DATA) MP_Config.h $(includedir) |
---|
104 | -chmod a-x $(libdir)/libMP.a $(includedir)/MP.h $(includedir)/MP_Config.h |
---|
105 | |
---|
106 | clean: |
---|
107 | ${CLEAN} |
---|
108 | rm -f libMP.a tmp.* tmp-* MP.tar* |
---|
109 | cd ${hdir}; ${CLEAN} |
---|
110 | |
---|
111 | uninstall: |
---|
112 | rm -f $(libdir)/libMP.a $(includedir)/MP.h $(includedir)/MP_Config.h |
---|
113 | - rmdir $(libdir) $(includedir) |
---|
114 | |
---|
115 | distclean: clean |
---|
116 | rm -f Makefile MP_Config.h stamp-h |
---|
117 | |
---|
118 | maintainer-clean: distclean |
---|
119 | @echo "This command is intendended for maintainers" |
---|
120 | @echo "You need perl to rebuild the deleted file" |
---|
121 | rm -f MP.h |
---|
122 | |
---|
123 | MP.h: ${HEADERS} |
---|
124 | perl ./makeheader.pl -I${hdir} ${hdir}/MP.h MP.h |
---|
125 | |
---|
126 | MP_Config.h: stamp-h |
---|
127 | |
---|
128 | stamp-h : ${top_srcdir}/config.status ${hdir}/MP_Config.h.in |
---|
129 | cd ${top_srcdir}; \ |
---|
130 | CONFIG_HEADERS="MP/MP_Config.h:MP/h/MP_Config.h.in" CONFIG_FILES= \ |
---|
131 | ./config.status |
---|
132 | |
---|
133 | Makefile: ${top_srcdir}/config.status Makefile.in |
---|
134 | cd ${top_srcdir}; CONFIG_HEADERS= CONFIG_FILES=MP/Makefile ./config.status |
---|
135 | |
---|
136 | ${top_srcdir}/config.status : ${top_srcdir}/configure |
---|
137 | cd ${top_srcdir}; ${MAKE} config.status |
---|
138 | |
---|
139 | ${top_srcdir}/configure: ${top_srcdir}/configure.in |
---|
140 | cd ${top_srcdir}; ${MAKE} configure |
---|
141 | |
---|
142 | TAGS: |
---|
143 | etags *.c ${hdir}/*.h |
---|
144 | |
---|
145 | dist: MP.h |
---|
146 | rm -f MP.tar* |
---|
147 | tar cf MP.tar ${DISTFILES} ChangeLog |
---|
148 | gzip -9 MP.tar |
---|
149 | |
---|
150 | depend: |
---|
151 | $(CC) -MM $(CPPFLAGS) $(DEFS) $(SRCS) >> Makefile |
---|