860
|
1 # @configure_input@ |
6
|
2 # |
|
3 # Common rules for octave's libcruft directories. |
|
4 # |
|
5 # John W. Eaton |
1452
|
6 # jwe@bevo.che.wisc.edu |
|
7 # University of Wisconsin-Madison |
6
|
8 # Department of Chemical Engineering |
|
9 |
|
10 SOURCES = *.f |
|
11 |
|
12 DISTFILES = Makefile.in $(SOURCES) $(SPECIAL) |
|
13 |
|
14 CRUFT_FSRC = $(wildcard $(srcdir)/*.f) |
|
15 CRUFT_BASE = $(notdir $(CRUFT_FSRC)) |
|
16 CRUFT_CSRC = $(patsubst %.f, %.c, $(CRUFT_BASE)) |
|
17 CRUFT_OBJ = $(patsubst %.f, %.o, $(CRUFT_BASE)) |
|
18 |
2036
|
19 ifeq ($(SHARED_LIBS), true) |
|
20 ifdef FPICFLAG |
|
21 CRUFT_PICOBJ := $(addprefix pic/, $(CRUFT_OBJ)) |
|
22 endif |
|
23 endif |
|
24 |
6
|
25 CWD = $(shell pwd) |
|
26 THISDIR = $(notdir $(CWD)) |
|
27 |
2037
|
28 all: stamp-picdir $(CRUFT_OBJ) $(CRUFT_PICOBJ) \ |
|
29 $(SPECIAL_DEPEND) $(SPECIAL_PICDEPEND) |
6
|
30 .PHONY: all |
|
31 |
1668
|
32 stamp-picdir: |
2358
|
33 if [ "$(SHARED_LIBS)" = true ]; then \ |
|
34 if [ -n "$(FPICFLAG)" ]; then \ |
|
35 if [ -d pic ]; then \ |
|
36 true ; \ |
|
37 else \ |
|
38 mkdir pic ; \ |
|
39 fi ; \ |
|
40 fi ; \ |
|
41 else \ |
|
42 true ; \ |
|
43 fi |
1668
|
44 touch stamp-picdir |
|
45 |
6
|
46 install: all |
|
47 .PHONY: install |
|
48 |
|
49 uninstall: |
|
50 .PHONY: uninstall |
|
51 |
|
52 tags: $(SOURCES) |
|
53 ctags $(SOURCES) |
|
54 |
|
55 TAGS: $(SOURCES) |
|
56 etags $(SOURCES) |
|
57 |
1459
|
58 clean:: |
2053
|
59 rm -f *.a *.o pic/*.o |
6
|
60 .PHONY: clean |
|
61 |
1459
|
62 mostlyclean:: |
2053
|
63 rm -f *.o pic/*.o |
6
|
64 .PHONY: mostlyclean |
|
65 |
1459
|
66 distclean:: clean |
2053
|
67 rm -f Makefile stamp-picdir |
|
68 -rmdir pic |
1459
|
69 .PHONY: distclean |
|
70 |
2386
|
71 maintainer-clean:: |
|
72 rm -f tags TAGS stamp-picdir Makefile |
2053
|
73 -rmdir pic |
1393
|
74 .PHONY: maintainer-clean |
6
|
75 |
|
76 local-dist: |
|
77 ln $(DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
78 .PHONY: local-dist |
|
79 |
|
80 dist: |
|
81 ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
82 .PHONY: dist |