File: Makefile

package info (click to toggle)
blimps 3.9+ds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, buster, sid
  • size: 6,812 kB
  • sloc: ansic: 43,271; csh: 553; perl: 116; makefile: 99; cs: 27; cobol: 23
file content (106 lines) | stat: -rw-r--r-- 2,801 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
PACKAGE := blimps
VERSION := 3.9
DISTDIR := $(PACKAGE)-$(VERSION)

BLIMPSDIR := blimps
DOCSDIR := docs
INCLUDEDIR := include
PROTOMATDIR := protomat

libdir ?= $(prefix)/lib

# export LD_LIBRARY_PATH=/mnt/home/lkajan/project/rostlab/blimps/blimps-3.9/blimps

all: blimps protomat

blimps:
	$(MAKE) -C $(BLIMPSDIR) -f Makefile.Linux VERSION=$(VERSION) DEBCFLAGS="$(CFLAGS)" DEBLDFLAGS="$(LDFLAGS)"

protomat:
	$(MAKE) -C $(PROTOMATDIR) -f Makefile.Linux VERSION=$(VERSION) DEBCFLAGS="$(CFLAGS)" DEBLDFLAGS="$(LDFLAGS)"

# The sift package does not provide fastaseqs but expects it to exist. Fortunately this package provides it.
install: install-utils install-lib-dev install-lib install-data install-doc

install-data:
	mkdir -p $(DESTDIR)$(prefix)/share/$(PACKAGE) && \
		cp -a $(DOCSDIR) \
			$(DESTDIR)$(prefix)/share/$(PACKAGE)/

install-utils:
	mkdir -p $(DESTDIR)$(prefix)/bin && \
		cp -a $(BLIMPSDIR)/fastaseqs \
			$(DESTDIR)$(prefix)/bin/

install-lib-dev:
	mkdir -p $(DESTDIR)$(prefix)/include/$(PACKAGE) && \
		cp $(INCLUDEDIR)/*.h $(DESTDIR)$(prefix)/include/$(PACKAGE)/
	mkdir -p $(DESTDIR)$(libdir) && \
		cp -a $(BLIMPSDIR)/*.a $(BLIMPSDIR)/*.so \
			$(DESTDIR)$(libdir)/

install-lib:
	mkdir -p $(DESTDIR)$(prefix)/lib && \
		cp -a $(BLIMPSDIR)/*.so.* \
			$(DESTDIR)$(libdir)/

.PHONY: install-doc
install-doc:
	mkdir -p $(DESTDIR)$(prefix)/share/doc/$(PACKAGE) && \
		cp -a LICENSE README UPDATES \
			$(DESTDIR)$(prefix)/share/doc/$(PACKAGE)/

clean: clean-blimps clean-protomat
	rm -f *.[12345678].gz

clean-blimps:
	-if [ -d $(BLIMPSDIR) ]; then $(MAKE) -C $(BLIMPSDIR) -f Makefile.Linux clean; fi

clean-protomat:
	-if [ -d $(PROTOMATDIR) ]; then $(MAKE) -C $(PROTOMATDIR) -f Makefile.Linux clean; fi

distclean: clean
	-if [ -d "$(DISTDIR)" ]; then rm -rf $(DISTDIR); fi
	rm -rf	\
		$(DISTDIR) \
		$(DISTDIR).tar.gz

dist: distdir
	tar chof - "$(DISTDIR)" | gzip -c >$(DISTDIR).tar.gz
	rm -rf $(DISTDIR)

distdir:
	rm -rf $(DISTDIR) && mkdir -p $(DISTDIR) && \
	rsync -avCR \
		--exclude /*-stamp \
		--exclude .*.swp \
		--exclude debian \
		ChangeLog \
		Makefile \
		$(PACKAGE).spec \
		$(DISTDIR)/;

help:
	@echo "Rules:"
	@echo "all*"
	@echo "*blimps"
	@echo "install+"
	@echo "+install-data"
	@echo "+install-lib"
	@echo "+install-lib-dev"
	@echo "+install-utils"
	@echo "clean"
	@echo "distclean"
	@echo "dist"
	@echo "help"
	@echo "*protomat"
	@echo
	@echo "Variables:"
	@echo "DESTDIR - install to DESTDIR"
	@echo "prefix - common installation prefix for all files"
	@echo "libdir - install libraries here, default: /$$(prefix)/lib"
	@echo "  use prefix=$$HOME to build for personal use"

.PHONY: all bin clean-blimps clean diff dist distclean distdir help install install-data install-lib install-lib-dev install-utils untar blimps protomat clean-protomat

# vim:ai: