860
|
1 # @configure_input@ |
6
|
2 # |
|
3 # Common rules for octave's libcruft directories. |
|
4 # |
2489
|
5 # XXX FIXME XXX -- assumes that the libcruft directory tree is only |
|
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 |
|
13 SOURCES = *.f |
|
14 |
|
15 DISTFILES = Makefile.in $(SOURCES) $(SPECIAL) |
|
16 |
3333
|
17 CRUFT_SRC = $(wildcard $(srcdir)/*.f) \ |
3325
|
18 $(wildcard $(srcdir)/*.c) \ |
|
19 $(wildcard $(srcdir)/*.cc) |
|
20 CRUFT_BASE = $(basename $(notdir $(CRUFT_SRC)) ) |
|
21 CRUFT_OBJ = $(addsuffix .o, $(CRUFT_BASE) ) |
6
|
22 |
2036
|
23 ifeq ($(SHARED_LIBS), true) |
|
24 ifdef FPICFLAG |
|
25 CRUFT_PICOBJ := $(addprefix pic/, $(CRUFT_OBJ)) |
3325
|
26 else |
|
27 CRUFT_PICOBJ := $(CRUFT_OBJ) |
2036
|
28 endif |
|
29 endif |
|
30 |
6
|
31 CWD = $(shell pwd) |
|
32 THISDIR = $(notdir $(CWD)) |
|
33 |
2489
|
34 LIBCRUFT_OBJS = $(CRUFT_OBJ) $(SPECIAL_DEPEND) |
|
35 |
3238
|
36 ifeq ($(STATIC_LIBS), true) |
3615
|
37 LIBCRUFT_DEPEND := $(LIBCRUFT_OBJS) |
3238
|
38 endif |
|
39 |
3034
|
40 all: pic $(LIBCRUFT_DEPEND) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND) |
3615
|
41 @echo "warning: run make in parent directory to update libraries" |
6
|
42 .PHONY: all |
|
43 |
2489
|
44 .PRECIOUS: $(LIBCRUFT_OBJS) |
|
45 |
3615
|
46 stmp-pic: pic |
|
47 @if [ -f stmp-pic ]; then \ |
|
48 true; \ |
|
49 else \ |
|
50 echo "touch stmp-pic"; \ |
|
51 touch stmp-pic; \ |
|
52 fi |
|
53 |
3029
|
54 pic: |
|
55 @if [ -d pic ]; then \ |
|
56 true; \ |
2358
|
57 else \ |
3029
|
58 echo "mkdir pic"; \ |
|
59 mkdir pic; \ |
2358
|
60 fi |
1668
|
61 |
3615
|
62 $(CRUFT_PICOBJ): stmp-pic |
|
63 |
2545
|
64 install:: all |
6
|
65 .PHONY: install |
|
66 |
5223
|
67 install-strip:: all |
|
68 .PHONY: install-strip |
|
69 |
2545
|
70 uninstall:: |
6
|
71 .PHONY: uninstall |
|
72 |
|
73 tags: $(SOURCES) |
|
74 ctags $(SOURCES) |
|
75 |
|
76 TAGS: $(SOURCES) |
|
77 etags $(SOURCES) |
|
78 |
1459
|
79 clean:: |
4276
|
80 rm -f *.d *.a *.o pic/*.o |
3615
|
81 -rmdir pic |
|
82 rm -f stmp-pic |
6
|
83 .PHONY: clean |
|
84 |
1459
|
85 mostlyclean:: |
4276
|
86 rm -f *.d *.o pic/*.o |
3615
|
87 -rmdir pic |
|
88 rm -f stmp-pic |
6
|
89 .PHONY: mostlyclean |
|
90 |
4440
|
91 distclean:: |
|
92 rm -f *.d *.a *.o pic/*.o |
|
93 -rmdir pic |
|
94 rm -f stmp-pic |
3029
|
95 rm -f Makefile |
1459
|
96 .PHONY: distclean |
|
97 |
4440
|
98 maintainer-clean:: |
|
99 rm -f *.d *.a *.o pic/*.o |
|
100 -rmdir pic |
|
101 rm -f stmp-pic |
|
102 rm -f Makefile |
3265
|
103 rm -f tags TAGS |
1393
|
104 .PHONY: maintainer-clean |
6
|
105 |
|
106 dist: |
|
107 ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
108 .PHONY: dist |