Mercurial > octave-nkf
annotate libcruft/Makefile.in @ 8874:bd1b1fe9c6e9 ss-3-1-53
bump version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Feb 2009 18:35:47 -0500 |
parents | e258715b2e78 |
children | eb63fbe60fab |
rev | line source |
---|---|
6 | 1 # Makefile for octave's libcruft directory |
2 # | |
7017 | 3 # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
4 # 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton | |
5 # | |
7016 | 6 # This file is part of Octave. |
7 # | |
8 # Octave is free software; you can redistribute it and/or modify it | |
9 # under the terms of the GNU General Public License as published by the | |
10 # Free Software Foundation; either version 3 of the License, or (at | |
11 # your option) any later version. | |
12 # | |
13 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 # for more details. | |
17 # | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with Octave; see the file COPYING. If not, see | |
20 # <http://www.gnu.org/licenses/>. | |
6 | 21 |
22 TOPDIR = .. | |
23 | |
24 srcdir = @srcdir@ | |
411 | 25 top_srcdir = @top_srcdir@ |
6 | 26 VPATH = @srcdir@ |
27 | |
28 include $(TOPDIR)/Makeconf | |
29 | |
651 | 30 INSTALL = @INSTALL@ |
31 INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
32 INSTALL_DATA = @INSTALL_DATA@ | |
33 | |
6 | 34 # List of the directories that contain Fortran source. Simply copying |
35 # a new .f file into one of these directories is sufficient to have it | |
6051 | 36 # added to $(LIBPRE)cruft.a. If you add a new directory here, you also need |
1668 | 37 # generate a new configure script in the top-level directory (edit |
38 # configure.in and run autoconf). | |
6 | 39 |
3690 | 40 # Some of the directories in libcruft may be only optionally built, |
41 # e.g. if they are already present on the system. For these, their | |
42 # dirname is substituted by configure and may be the empty string. | |
43 | |
3989 | 44 CRUFT_DIRS = amos @BLAS_DIR@ blas-xtra daspk dasrt dassl \ |
8306
43795cf108d0
initial implementation of fsolve
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
45 @FFT_DIR@ @LAPACK_DIR@ lapack-xtra \ |
8547
d66c9b6e506a
imported patch qrupdate.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8306
diff
changeset
|
46 misc odepack ordered-qz quadpack ranlib \ |
3989 | 47 slatec-err slatec-fn villad |
6 | 48 |
49 SUBDIRS = $(CRUFT_DIRS) | |
50 | |
3852 | 51 DISTSUBDIRS = $(sort $(CRUFT_DIRS) blas fftpack lapack) |
3700 | 52 |
4441 | 53 CLEAN_SUBDIRS = $(DISTSUBDIRS) |
54 | |
6102 | 55 DISTFILES = Makefile.in ChangeLog Makerules.in $(SOURCES) \ |
56 STOP.patch mkf77def.in | |
6 | 57 |
6137 | 58 XTRA_CRUFT_SH_LDFLAGS = @XTRA_CRUFT_SH_LDFLAGS@ |
59 SH_LDFLAGS += $(XTRA_CRUFT_SH_LDFLAGS) | |
60 | |
6102 | 61 # Include BLAS and FFTW just in case some of libcruft depends on them |
6137 | 62 LINK_DEPS = $(BLAS_LIBS) $(FFTW_LIBS) $(FLIBS) |
4102 | 63 |
3615 | 64 all: libraries |
6 | 65 .PHONY: all |
66 | |
6102 | 67 mkf77def: mkf77def.in $(TOPDIR)/Makeconf |
68 @$(do-subst-f77-mangling) | |
69 chmod a+rx $@ | |
70 | |
71 $(SUBDIRS): mkf77def | |
3297 | 72 $(MAKE) -C $@ all |
1134 | 73 .PHONY: $(SUBDIRS) |
6 | 74 |
5775 | 75 # FIXME -- this should build the shared library directly from |
2490 | 76 # a normal archive file (created from PIC code, though). |
77 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7553
diff
changeset
|
78 MISC_OBJ := misc/machar.o misc/smachar.o misc/f77-extern.o \ |
4571 | 79 misc/f77-fcn.o misc/lo-error.o misc/quit.o misc/cquit.o |
1914 | 80 |
1682 | 81 CRUFT_FSRC := $(foreach dir, $(SUBDIRS), $(wildcard $(srcdir)/$(dir)/*.f)) |
2512 | 82 CRUFT_OBJ2 := $(patsubst $(srcdir)/%, %, $(CRUFT_FSRC)) |
2425 | 83 CRUFT_OBJ1 := $(patsubst %.f, %.o, $(CRUFT_OBJ2)) |
1914 | 84 CRUFT_OBJ := $(CRUFT_OBJ1) $(MISC_OBJ) |
6102 | 85 CRUFT_DEFS := $(patsubst %.f, %.def, $(CRUFT_OBJ2)) |
1682 | 86 |
87 ifeq ($(SHARED_LIBS), true) | |
88 ifdef FPICFLAG | |
89 CRUFT_OBJ_DIR := $(dir $(CRUFT_OBJ)) | |
90 CRUFT_OBJ_PICDIR := $(addsuffix pic/, $(CRUFT_OBJ_DIR)) | |
91 CRUFT_OBJ_NOTDIR := $(notdir $(CRUFT_OBJ)) | |
92 CRUFT_PICOBJ := $(join $(CRUFT_OBJ_PICDIR), $(CRUFT_OBJ_NOTDIR)) | |
93 else | |
94 CRUFT_PICOBJ := $(CRUFT_OBJ) | |
95 endif | |
96 endif | |
6 | 97 |
3029 | 98 ifeq ($(SHARED_LIBS), true) |
3615 | 99 ifeq ($(STATIC_LIBS), true) |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
100 LIBRARIES = $(LIBPRE)cruft.$(LIBEXT) $(SHLLIBPRE)cruft.$(SHLEXT_VER) |
3615 | 101 else |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
102 LIBRARIES = $(SHLLIBPRE)cruft.$(SHLEXT_VER) |
3615 | 103 endif |
3029 | 104 else |
3615 | 105 ifeq ($(STATIC_LIBS), true) |
6051 | 106 LIBRARIES = $(LIBPRE)cruft.$(LIBEXT) |
3615 | 107 else |
3647 | 108 LIBRARIES = |
3615 | 109 endif |
3029 | 110 endif |
3647 | 111 |
6102 | 112 $(CRUFT_DEFS): $(SUBDIRS) |
113 | |
114 cruft.def: $(CRUFT_DEFS) | |
115 echo "EXPORTS" > $@ | |
116 cat $(CRUFT_DEFS) >> $@ | |
117 | |
118 libraries: cruft.def | |
3647 | 119 $(MAKE) $(LIBRARIES) |
3615 | 120 .PHONY: libraries |
121 | |
6051 | 122 $(LIBPRE)cruft.$(LIBEXT): $(CRUFT_OBJ) |
3615 | 123 rm -f $@ |
124 $(AR) $(ARFLAGS) $@ $^ | |
125 $(RANLIB) $@ | |
3029 | 126 |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
127 $(SHLLIBPRE)cruft.$(SHLEXT_VER): $(SHLLIBPRE)cruft.$(SHLEXT) |
3049 | 128 rm -f $@ |
3036 | 129 $(LN_S) $< $@ |
3029 | 130 |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
131 $(SHLLIBPRE)cruft.$(SHLEXT): $(CRUFT_PICOBJ) |
3615 | 132 rm -f $@ |
4102 | 133 $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LINK_DEPS) |
1682 | 134 |
6 | 135 $(CRUFT_OBJ): |
136 | |
137 check: all | |
138 .PHONY: check | |
139 | |
4442 | 140 install install-strip uninstall:: |
1685 | 141 @$(subdir-for-command) |
1167 | 142 |
4441 | 143 clean mostlyclean distclean maintainer-clean:: |
144 @$(foreach d, $(CLEAN_SUBDIRS), $(do-subdir-for-command)) | |
145 | |
1167 | 146 install:: |
4413 | 147 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir) |
3034 | 148 if $(STATIC_LIBS); then \ |
6051 | 149 rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \ |
150 $(INSTALL_DATA) $(LIBPRE)cruft.$(LIBEXT) \ | |
151 $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \ | |
152 $(RANLIB) $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \ | |
3034 | 153 fi |
1682 | 154 if $(SHARED_LIBS); then \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
155 rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER); \ |
4473 | 156 $(INSTALL) \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
157 $(SHLLIBPRE)cruft.$(SHLLIB) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER); \ |
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
158 rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB); \ |
5451 | 159 (cd $(DESTDIR)$(octlibdir); \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
160 $(LN_S) $(SHLLIBPRE)cruft.$(SHLLIB_VER) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB)); \ |
4102 | 161 if test x$(SHLBIN) != x ; then \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
162 rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \ |
4473 | 163 $(INSTALL_PROGRAM) \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
164 $(SHLBINPRE)cruft.$(SHLBIN) $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \ |
4102 | 165 fi; \ |
1682 | 166 fi |
6 | 167 |
2811 | 168 install-strip:: |
169 $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install | |
170 | |
1167 | 171 uninstall:: |
6051 | 172 rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
173 rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB) |
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
174 rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER) |
4102 | 175 if test x$(SHLBIN) != x; then \ |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
176 rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \ |
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
177 rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN_VER); \ |
4102 | 178 fi |
6 | 179 |
1167 | 180 tags TAGS:: $(SOURCES) |
181 $(SUBDIR_FOR_COMMAND) | |
182 | |
183 tags:: | |
6 | 184 ctags $(SOURCES) |
185 | |
1167 | 186 TAGS:: $(SOURCES) |
6 | 187 etags $(SOURCES) |
188 | |
8873
e258715b2e78
fixes for clean targets in Makefiles
John W. Eaton <jwe@octave.org>
parents:
8618
diff
changeset
|
189 clean mostlyclean distclean maintainer-clean:: |
6488 | 190 rm -f $(LIBPRE)cruft.$(LIBEXT) |
8618
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
191 rm -f $(SHLLIBPRE)cruft.$(SHLEXT_VER) $(SHLLIBPRE)cruft.$(SHLEXT) |
f8b3ece45bda
use separate prefix for shllib and shlbin files
John W. Eaton <jwe@octave.org>
parents:
8547
diff
changeset
|
192 rm -f $(SHLBINPRE)cruft.$(SHLBIN_VER) $(SHLBINPRE)cruft.$(SHLBIN) |
6488 | 193 rm -f $(CRUFT_DEFS) cruft.def mkf77def |
6 | 194 |
5276 | 195 distclean maintainer-clean:: |
196 rm -f Makefile Makerules so_locations | |
6 | 197 |
2379 | 198 maintainer-clean:: |
5276 | 199 rm -f tags TAGS |
6 | 200 |
201 dist: | |
3700 | 202 for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; $(MAKE) -C $$dir $@; done |
6797 | 203 ln $(addprefix $(srcdir)/, $(DISTFILES)) ../`cat ../.fname`/libcruft |
6 | 204 .PHONY: dist |
2624 | 205 |
3648 | 206 .NOTPARALLEL: |