1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Top-level Makefile for MP |
---|
4 | ### |
---|
5 | ################################################################# |
---|
6 | |
---|
7 | SHELL = /bin/sh |
---|
8 | |
---|
9 | ## |
---|
10 | ## versions |
---|
11 | ## |
---|
12 | PRODUCT = @PRODUCT@ |
---|
13 | VERSION = @VERSION@ |
---|
14 | DISTNAME = ${PRODUCT}-${VERSION} |
---|
15 | |
---|
16 | ## |
---|
17 | ## various paths |
---|
18 | ## |
---|
19 | prefix = @prefix@ |
---|
20 | exec_prefix = @exec_prefix@ |
---|
21 | includedir = @includedir@ |
---|
22 | libdir = @libdir@ |
---|
23 | |
---|
24 | ## |
---|
25 | ## various programs |
---|
26 | ## |
---|
27 | @SET_MAKE@ |
---|
28 | CLEAN = @CLEAN@ |
---|
29 | RANLIB = ranlib |
---|
30 | RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ] |
---|
31 | INSTALL = ./install-sh -c |
---|
32 | INSTALL_PROGRAM = ${INSTALL} |
---|
33 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
34 | MKINSTALLDIRS = ./mkinstalldirs |
---|
35 | |
---|
36 | ## |
---|
37 | ## subdirs |
---|
38 | ## |
---|
39 | SUBDIRS = MP MPT examples mpviewer mp-pvm3 @CONFIG_SUBDIRS@ |
---|
40 | BUILD_SUBDIRS = @BUILD_SUBDIRS@ |
---|
41 | TEMPDIR = /tmp |
---|
42 | |
---|
43 | ## |
---|
44 | ## End configuration dependend stuff |
---|
45 | ################################################################# |
---|
46 | |
---|
47 | all install uninstall: Makefile |
---|
48 | for SUBDIR in ${BUILD_SUBDIRS}; \ |
---|
49 | do \ |
---|
50 | if test "$${SUBDIR}" = gmp && test "$@" != all; then \ |
---|
51 | if test "$@" = install; then \ |
---|
52 | ${MAKE} installgmp; \ |
---|
53 | else \ |
---|
54 | ${MAKE} uninstallgmp; \ |
---|
55 | fi; \ |
---|
56 | else \ |
---|
57 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
58 | cd $${SUBDIR}; \ |
---|
59 | ${MAKE} $@; \ |
---|
60 | cd .. ;\ |
---|
61 | fi; \ |
---|
62 | done |
---|
63 | |
---|
64 | install_all: install |
---|
65 | |
---|
66 | clean distclean mostlyclean maintainer-clean: |
---|
67 | for SUBDIR in ${SUBDIRS}; \ |
---|
68 | do \ |
---|
69 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
70 | cd $${SUBDIR}; \ |
---|
71 | ${MAKE} $@; \ |
---|
72 | cd .. ;\ |
---|
73 | done |
---|
74 | case $@ in \ |
---|
75 | clean) ${CLEAN} ;;\ |
---|
76 | mostlyclean) ${CLEAN} ;;\ |
---|
77 | distclean) ${CLEAN}; \ |
---|
78 | rm -rf Makefile config.status config.log config.cache TAGS* \ |
---|
79 | *.gz *.tar *.tgz lib include info bin;;\ |
---|
80 | maintainer-clean) rm -f configure; ${CLEAN}; \ |
---|
81 | rm -rf Makefile config.status config.log config.cache TAGS* \ |
---|
82 | *.gz *.tar *.tgz lib include info;;\ |
---|
83 | esac |
---|
84 | |
---|
85 | libMP.a MP: force |
---|
86 | cd MP; $(MAKE) all |
---|
87 | |
---|
88 | libMPT.a MPT : force |
---|
89 | cd MPT; $(MAKE) all |
---|
90 | |
---|
91 | gmp/libgmp.a : |
---|
92 | cd gmp; $(MAKE) libgmp.a |
---|
93 | |
---|
94 | installgmp: gmp/libgmp.a |
---|
95 | ${MKINSTALLDIRS} ${libdir} |
---|
96 | ${MKINSTALLDIRS} ${includedir} |
---|
97 | $(INSTALL_DATA) gmp/libgmp.a ${libdir} |
---|
98 | if $(RANLIB_TEST) ; then $(RANLIB) $(libdir)/libgmp.a; else true; fi |
---|
99 | $(INSTALL_DATA) gmp/gmp.h $(includedir) |
---|
100 | |
---|
101 | uninstallgmp: force |
---|
102 | rm -f $(libdir)/libgmp.a $(includedir)/gmp.h |
---|
103 | - rmdir $(libdir) $(includedir) |
---|
104 | |
---|
105 | examples: force |
---|
106 | cd examples; $(MAKE) all |
---|
107 | |
---|
108 | mpviewer: force |
---|
109 | cd mpviewer; $(MAKE) all |
---|
110 | |
---|
111 | mp-pvm3: force |
---|
112 | cd mp-pvm3; $(MAKE) all |
---|
113 | |
---|
114 | force: |
---|
115 | .PNONY: install uninstall |
---|
116 | .PHONY: clean distclean force |
---|
117 | |
---|
118 | dist: |
---|
119 | rm -rf ${DISTNAME}.tar* ${TEMPDIR}/${DISTNAME}* |
---|
120 | mkdir ${TEMPDIR}/${DISTNAME} |
---|
121 | cp -pR . ${TEMPDIR}/${DISTNAME} |
---|
122 | cd ${TEMPDIR}/${DISTNAME}; ${MAKE} distclean; |
---|
123 | - find ${TEMPDIR}/${DISTNAME} -name CVS -exec rm -rf {} \; |
---|
124 | cd ${TEMPDIR}; tar cf ${DISTNAME}.tar ${DISTNAME} |
---|
125 | rm -rf ${TEMPDIR}/${DISTNAME} |
---|
126 | gzip -9 ${TEMPDIR}/${DISTNAME}.tar |
---|
127 | - mv ${TEMPDIR}/${DISTNAME}.tar.gz . |
---|
128 | |
---|
129 | TAGS: |
---|
130 | etags MP/*.c MPT/*.c MP/h/*.h MPT/*.h |
---|
131 | |
---|
132 | info dvi check: |
---|
133 | echo Sorry, make target $@ is not implemented |
---|
134 | |
---|
135 | Makefile: Makefile.in config.status |
---|
136 | CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status |
---|
137 | |
---|
138 | config.status : configure |
---|
139 | ./config.status --recheck |
---|
140 | |
---|
141 | configure: configure.in |
---|
142 | @echo "WARNING: You need to rerun autoconf. I am proceeding, for now." |
---|
143 | touch configure |
---|
144 | # autoconf |
---|
145 | |
---|
146 | |
---|