860
|
1 # @configure_input@ |
6
|
2 # |
|
3 # Common rules for octave's libcruft directories. |
|
4 # |
5775
|
5 # FIXME -- assumes that the libcruft directory tree is only |
2489
|
6 # one level deep. |
|
7 # |
6
|
8 # John W. Eaton |
1452
|
9 # jwe@bevo.che.wisc.edu |
|
10 # University of Wisconsin-Madison |
6
|
11 # Department of Chemical Engineering |
|
12 |
6137
|
13 DLL_CDEFS = @CRUFT_DLL_DEFS@ |
|
14 DLL_CXXDEFS = @CRUFT_DLL_DEFS@ |
6087
|
15 |
6281
|
16 CRUFT_FSRC = $(addprefix $(srcdir)/, $(FSRC)) |
|
17 CRUFT_CSRC = $(addprefix $(srcdir)/, $(CSRC)) |
|
18 CRUFT_CXXSRC = $(addprefix $(srcdir)/, $(CXXSRC)) |
6
|
19 |
6102
|
20 CRUFT_SRC = $(CRUFT_FSRC) $(CRUFT_CSRC) $(CRUFT_CXXSRC) |
3325
|
21 CRUFT_BASE = $(basename $(notdir $(CRUFT_SRC)) ) |
|
22 CRUFT_OBJ = $(addsuffix .o, $(CRUFT_BASE) ) |
6102
|
23 CRUFT_DEFS = $(patsubst %.f, %.def, $(notdir $(CRUFT_FSRC))) |
6
|
24 |
6281
|
25 DISTFILES = Makefile.in $(CRUFT_SRC) $(SPECIAL) |
|
26 |
2036
|
27 ifeq ($(SHARED_LIBS), true) |
|
28 ifdef FPICFLAG |
|
29 CRUFT_PICOBJ := $(addprefix pic/, $(CRUFT_OBJ)) |
3325
|
30 else |
|
31 CRUFT_PICOBJ := $(CRUFT_OBJ) |
2036
|
32 endif |
|
33 endif |
|
34 |
6
|
35 CWD = $(shell pwd) |
|
36 THISDIR = $(notdir $(CWD)) |
|
37 |
2489
|
38 LIBCRUFT_OBJS = $(CRUFT_OBJ) $(SPECIAL_DEPEND) |
|
39 |
3238
|
40 ifeq ($(STATIC_LIBS), true) |
3615
|
41 LIBCRUFT_DEPEND := $(LIBCRUFT_OBJS) |
3238
|
42 endif |
|
43 |
6102
|
44 all: pic $(CRUFT_DEFS) $(LIBCRUFT_DEPEND) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND) |
3615
|
45 @echo "warning: run make in parent directory to update libraries" |
6
|
46 .PHONY: all |
|
47 |
2489
|
48 .PRECIOUS: $(LIBCRUFT_OBJS) |
|
49 |
3615
|
50 stmp-pic: pic |
|
51 @if [ -f stmp-pic ]; then \ |
|
52 true; \ |
|
53 else \ |
|
54 echo "touch stmp-pic"; \ |
|
55 touch stmp-pic; \ |
|
56 fi |
|
57 |
3029
|
58 pic: |
|
59 @if [ -d pic ]; then \ |
|
60 true; \ |
2358
|
61 else \ |
3029
|
62 echo "mkdir pic"; \ |
|
63 mkdir pic; \ |
2358
|
64 fi |
1668
|
65 |
3615
|
66 $(CRUFT_PICOBJ): stmp-pic |
|
67 |
6102
|
68 $(CRUFT_DEFS): $(TOPDIR)/libcruft/mkf77def |
|
69 |
|
70 %.def : %.f |
|
71 @echo "making $@ from $<" |
6152
|
72 @$(TOPDIR)/libcruft/mkf77def < $< > $@-t |
|
73 @$(simple-move-if-change-rule) |
6102
|
74 |
2545
|
75 install:: all |
6
|
76 .PHONY: install |
|
77 |
5223
|
78 install-strip:: all |
|
79 .PHONY: install-strip |
|
80 |
2545
|
81 uninstall:: |
6
|
82 .PHONY: uninstall |
|
83 |
|
84 tags: $(SOURCES) |
|
85 ctags $(SOURCES) |
|
86 |
|
87 TAGS: $(SOURCES) |
|
88 etags $(SOURCES) |
|
89 |
5276
|
90 clean mostlyclean distclean maintainer-clean:: |
6102
|
91 rm -f $(MAKEDEPS) $(CRUFT_OBJ) $(CRUFT_PICOBJ) $(CRUFT_DEFS) |
3615
|
92 -rmdir pic |
|
93 rm -f stmp-pic |
5276
|
94 .PHONY: clean mostlyclean |
6
|
95 |
5276
|
96 distclean maintainer-clean:: |
3029
|
97 rm -f Makefile |
1459
|
98 .PHONY: distclean |
|
99 |
4440
|
100 maintainer-clean:: |
3265
|
101 rm -f tags TAGS |
1393
|
102 .PHONY: maintainer-clean |
6
|
103 |
|
104 dist: |
|
105 ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
106 .PHONY: dist |