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 |
2036
|
28 all: stamp-picdir $(CRUFT_OBJ) $(SPECIAL_DEPEND) $(CRUFT_PICOBJ) |
6
|
29 .PHONY: all |
|
30 |
1668
|
31 stamp-picdir: |
1682
|
32 if [ -n "$(FPICFLAG)" ]; then \ |
1668
|
33 if [ -d pic ]; then true; else mkdir pic ; fi ; \ |
|
34 else true; fi |
|
35 touch stamp-picdir |
|
36 |
6
|
37 install: all |
|
38 .PHONY: install |
|
39 |
|
40 uninstall: |
|
41 .PHONY: uninstall |
|
42 |
|
43 tags: $(SOURCES) |
|
44 ctags $(SOURCES) |
|
45 |
|
46 TAGS: $(SOURCES) |
|
47 etags $(SOURCES) |
|
48 |
1459
|
49 clean:: |
6
|
50 rm -f *.a *.o |
|
51 .PHONY: clean |
|
52 |
1459
|
53 mostlyclean:: |
6
|
54 rm -f *.o |
|
55 .PHONY: mostlyclean |
|
56 |
1459
|
57 distclean:: clean |
|
58 rm -f Makefile |
|
59 .PHONY: distclean |
|
60 |
|
61 maintainer-clean:: distclean |
|
62 rm -f tags TAGS |
1393
|
63 .PHONY: maintainer-clean |
6
|
64 |
|
65 local-dist: |
|
66 ln $(DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
67 .PHONY: local-dist |
|
68 |
|
69 dist: |
|
70 ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR) |
|
71 .PHONY: dist |