6
|
1 # |
|
2 # Makefile for octave's libcruft directory |
|
3 # |
|
4 # John W. Eaton |
1452
|
5 # jwe@bevo.che.wisc.edu |
|
6 # University of Wisconsin-Madison |
6
|
7 # Department of Chemical Engineering |
|
8 |
|
9 TOPDIR = .. |
|
10 |
|
11 srcdir = @srcdir@ |
411
|
12 top_srcdir = @top_srcdir@ |
6
|
13 VPATH = @srcdir@ |
|
14 |
|
15 include $(TOPDIR)/Makeconf |
|
16 |
651
|
17 INSTALL = @INSTALL@ |
|
18 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
19 INSTALL_DATA = @INSTALL_DATA@ |
|
20 |
6
|
21 # List of the directories that contain Fortran source. Simply copying |
|
22 # a new .f file into one of these directories is sufficient to have it |
|
23 # added to libcruft.a. If you add a new directory here, you also need |
1668
|
24 # generate a new configure script in the top-level directory (edit |
|
25 # configure.in and run autoconf). |
6
|
26 |
41
|
27 CRUFT_DIRS = balgen blas dassl eispack fftpack fsqp lapack linpack \ |
1073
|
28 minpack misc npsol odepack qpsol quadpack ranlib slatec-fn \ |
|
29 villad |
6
|
30 |
|
31 SUBDIRS = $(CRUFT_DIRS) |
|
32 |
1668
|
33 DISTFILES = Makefile.in Makerules.in $(SOURCES) STOP.patch |
6
|
34 |
1134
|
35 all: $(SUBDIRS) libcruft.a |
6
|
36 .PHONY: all |
|
37 |
1134
|
38 $(SUBDIRS): |
|
39 echo making all in $@ |
|
40 cd $@; $(MAKE) all |
|
41 .PHONY: $(SUBDIRS) |
6
|
42 |
|
43 CRUFT_FSRC = $(foreach dir, $(SUBDIRS), $(wildcard $(srcdir)/$(dir)/*.f)) |
|
44 CRUFT_OBJ3 = $(patsubst $(srcdir)/%, %, $(CRUFT_FSRC)) |
|
45 CRUFT_OBJ2 = $(patsubst %.f, %.o, $(CRUFT_OBJ3)) |
|
46 CRUFT_OBJ1 = $(subst misc/d1mach.o, , $(CRUFT_OBJ2)) |
|
47 CRUFT_OBJ = $(CRUFT_OBJ1) misc/d1mach.o misc/dostop.o |
|
48 |
759
|
49 libcruft.a: $(CRUFT_OBJ) |
|
50 rm -f libcruft.a |
|
51 $(AR) $(ARFLAGS) libcruft.a $(CRUFT_OBJ) |
|
52 $(RANLIB) libcruft.a |
6
|
53 |
|
54 $(CRUFT_OBJ): |
|
55 |
|
56 check: all |
|
57 .PHONY: check |
|
58 |
1391
|
59 install uninstall clean mostlyclean distclean maintainer-clean:: |
1167
|
60 $(SUBDIR_FOR_COMMAND) |
|
61 |
|
62 install:: |
810
|
63 $(top_srcdir)/mkinstalldirs $(libdir) |
6
|
64 rm -f $(libdir)/libcruft.a |
759
|
65 $(INSTALL_DATA) libcruft.a $(libdir)/libcruft.a |
6
|
66 $(RANLIB) $(libdir)/libcruft.a |
|
67 |
1167
|
68 uninstall:: |
6
|
69 rm -f $(libdir)/libcruft.a |
|
70 |
1167
|
71 tags TAGS:: $(SOURCES) |
|
72 $(SUBDIR_FOR_COMMAND) |
|
73 |
|
74 tags:: |
6
|
75 ctags $(SOURCES) |
|
76 |
1167
|
77 TAGS:: $(SOURCES) |
6
|
78 etags $(SOURCES) |
|
79 |
1167
|
80 clean mostlyclean:: |
6
|
81 rm -f *.a *.o |
|
82 |
1459
|
83 distclean:: clean |
1668
|
84 rm -f Makefile Makerules |
6
|
85 |
1459
|
86 maintainer-clean:: distclean |
|
87 rm -f tags TAGS |
6
|
88 |
|
89 local-dist: |
|
90 for dir in $(SUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; cd $$dir; $(MAKE) $@; cd ..; done |
|
91 ln $(DISTFILES) ../`cat ../.fname`/libcruft |
|
92 .PHONY: local-dist |
|
93 |
|
94 dist: |
|
95 for dir in $(SUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; cd $$dir; $(MAKE) $@; cd ..; done |
|
96 ln $(DISTFILES) ../`cat ../.fname`/libcruft |
|
97 .PHONY: dist |