Debian Codegraph @

Makefile

raw ◀ ▶
2 Debian patches touch this file
1 #-------------------------------------------------------------------------------
2 # Top level makefile for MUMmer 3.0
3 #
4 # Dependencies: '/bin/sh', 'g++', 'gcc', 'csh', 'perl', 'sed'
5 #
6 # 'make all' builds all MUMmer code and scripts in the base directory
7 #
8 # 'make check' checks for the existance of the MUMmer dependencies
9 #
10 # 'make clean' removes *.o *~ core* and executable files
11 #
12 # 'make dist' creates a gzipped tarfile of the MUMmer directories
13 #
14 # 'make install' alias for 'make all' (for compatibility)
15 #
16 # 'make kurtz' builds Stefan's mummer program in the base directory
17 #
18 # 'make scripts' builds the MUMmer scripts in the base directory
19 #
20 # 'make tigr' builds TIGR's code in the base directory
21 #
22 # 'make uninstall' alias for 'make clean' (for compatibility)
23 #
24 #-------------------------------------------------------------------------------
25 SHELL = /bin/sh
26 VERSION := 3.23
27
28
29 TOP_DIR := $(CURDIR)
30 BIN_DIR := $(TOP_DIR)
31 AUX_BIN_DIR := $(TOP_DIR)/aux_bin
32
33 DOC_DIR := $(TOP_DIR)/docs
34 SCRIPT_DIR := $(TOP_DIR)/scripts
35 TIGR_SRC_DIR := $(TOP_DIR)/src/tigr
36 KURTZ_SRC_DIR := $(TOP_DIR)/src/kurtz
37
38 CC := $(filter /%,$(shell /bin/sh -c 'type gcc'))
39 CXX := $(filter /%,$(shell /bin/sh -c 'type g++'))
40 SED := $(filter /%,$(shell /bin/sh -c 'type sed'))
41 PERL := $(filter /%,$(shell /bin/sh -c 'type perl'))
42 AR := $(filter /%,$(shell /bin/sh -c 'type ar'))
43
44 CXXFLAGS = -O3
45 CFLAGS = -O3
46 LDFLAGS =
47
48 FLATS = ACKNOWLEDGEMENTS COPYRIGHT INSTALL LICENSE Makefile README ChangeLog
49
50
51
52 #-- EXPORT THESE VARIABLES TO OTHER MAKEFILES
53 export BIN_DIR AUX_BIN_DIR CXX CC CFLAGS CXXFLAGS LDFLAGS
54
55
56
57
58 #-- PHONY rules --#
59 .PHONY: all check clean dist scripts uninstall
60
61
62 all: kurtz tigr scripts
63
64
65 check:
66 ifndef TOP_DIR
67 @echo "ERROR: could not find working directory"
68 endif
69 ifndef CC
70 @echo "ERROR: 'gcc' GNU C compiler not found"
71 endif
72 ifndef CXX
73 @echo "ERROR: 'g++' GNU C++ compiler not found"
74 endif
75 ifndef SED
76 @echo "ERROR: 'sed' StreamEDitor not found"
77 endif
78 ifndef PERL
79 @echo "ERROR: 'perl' PERL not found"
80 endif
81 ifndef AR
82 @echo "ERROR: 'ar' GNU archiver not found"
83 endif
84 @echo "check complete"
85
86
87 clean:
88 rm -f *~ core*
89 cd $(KURTZ_SRC_DIR); $(MAKE) clean
90 cd $(TIGR_SRC_DIR); $(MAKE) clean
91 cd $(SCRIPT_DIR); $(MAKE) clean
92 cd $(DOC_DIR); $(MAKE) clean
93
94
95 dist: DISTDIR = MUMmer$(VERSION)
96 dist:
97 mkdir $(DISTDIR)
98 cp -r aux_bin $(DISTDIR)
99 cp -r docs $(DISTDIR)
100 cp -r scripts $(DISTDIR)
101 cp -r src $(DISTDIR)
102 cp $(FLATS) $(DISTDIR)
103 rm -rf `find $(DISTDIR) -name CVS`
104 tar -cvf $(DISTDIR).tar $(DISTDIR)
105 gzip $(DISTDIR).tar
106 rm -rf $(DISTDIR)
107
108
109 install: all
110
111
112 kurtz:
113 cd $(KURTZ_SRC_DIR); $(MAKE) mummer
114
115
116 scripts:
117 cd $(SCRIPT_DIR); $(MAKE) all
118
119
120 tigr:
•121 cd $(TIGR_SRC_DIR); $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" all
122
123
124 uninstall: clean
125
126
127 #-- END OF MAKEFILE --#