6
|
1 # |
|
2 # Makefile for octave's libcruft directory |
|
3 # |
|
4 # John W. Eaton |
|
5 # jwe@che.utexas.edu |
|
6 # Department of Chemical Engineering |
|
7 # The University of Texas at Austin |
|
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 |
|
24 # generate a new configure script (edit configure.in and run autoconf). |
|
25 |
41
|
26 CRUFT_DIRS = balgen blas dassl eispack fftpack fsqp lapack linpack \ |
1073
|
27 minpack misc npsol odepack qpsol quadpack ranlib slatec-fn \ |
|
28 villad |
6
|
29 |
|
30 SUBDIRS = $(CRUFT_DIRS) |
|
31 |
|
32 DISTFILES = Makefile.in Makerules.in $(SOURCES) STOP.patch |
|
33 |
1134
|
34 all: $(SUBDIRS) libcruft.a |
6
|
35 .PHONY: all |
|
36 |
1134
|
37 $(SUBDIRS): |
|
38 echo making all in $@ |
|
39 cd $@; $(MAKE) all |
|
40 .PHONY: $(SUBDIRS) |
6
|
41 |
|
42 CRUFT_FSRC = $(foreach dir, $(SUBDIRS), $(wildcard $(srcdir)/$(dir)/*.f)) |
|
43 CRUFT_OBJ3 = $(patsubst $(srcdir)/%, %, $(CRUFT_FSRC)) |
|
44 CRUFT_OBJ2 = $(patsubst %.f, %.o, $(CRUFT_OBJ3)) |
|
45 CRUFT_OBJ1 = $(subst misc/d1mach.o, , $(CRUFT_OBJ2)) |
|
46 CRUFT_OBJ = $(CRUFT_OBJ1) misc/d1mach.o misc/dostop.o |
|
47 |
759
|
48 libcruft.a: $(CRUFT_OBJ) |
|
49 rm -f libcruft.a |
|
50 $(AR) $(ARFLAGS) libcruft.a $(CRUFT_OBJ) |
|
51 $(RANLIB) libcruft.a |
6
|
52 |
|
53 $(CRUFT_OBJ): |
|
54 |
|
55 check: all |
|
56 .PHONY: check |
|
57 |
1167
|
58 install uninstall clean mostlyclean distclean realclean:: |
|
59 $(SUBDIR_FOR_COMMAND) |
|
60 |
|
61 install:: |
810
|
62 $(top_srcdir)/mkinstalldirs $(libdir) |
6
|
63 rm -f $(libdir)/libcruft.a |
759
|
64 $(INSTALL_DATA) libcruft.a $(libdir)/libcruft.a |
6
|
65 $(RANLIB) $(libdir)/libcruft.a |
|
66 |
1167
|
67 uninstall:: |
6
|
68 rm -f $(libdir)/libcruft.a |
|
69 |
1167
|
70 tags TAGS:: $(SOURCES) |
|
71 $(SUBDIR_FOR_COMMAND) |
|
72 |
|
73 tags:: |
6
|
74 ctags $(SOURCES) |
|
75 |
1167
|
76 TAGS:: $(SOURCES) |
6
|
77 etags $(SOURCES) |
|
78 |
1167
|
79 clean mostlyclean:: |
6
|
80 rm -f *.a *.o |
|
81 |
1167
|
82 distclean:: |
759
|
83 rm -f *.a *.o Makefile |
6
|
84 |
1167
|
85 realclean:: |
759
|
86 rm -f *.a *.o tags TAGS Makefile |
6
|
87 |
|
88 local-dist: |
|
89 for dir in $(SUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; cd $$dir; $(MAKE) $@; cd ..; done |
|
90 ln $(DISTFILES) ../`cat ../.fname`/libcruft |
|
91 .PHONY: local-dist |
|
92 |
|
93 dist: |
|
94 for dir in $(SUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; cd $$dir; $(MAKE) $@; cd ..; done |
|
95 ln $(DISTFILES) ../`cat ../.fname`/libcruft |
|
96 .PHONY: dist |