-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
60 lines (49 loc) · 982 Bytes
/
Makefile.in
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
# pfamannot
# Protein Family Annotator
#
# Makefile.in
# Copyright (c) 2020 Jan Hamalčík
#
# Makefile template for pfamannot
#
CURL = curl-7.69.1
ZLIB = zlib-1.2.11
PROG = pfamannot
CXX = g++
CXXFLAGS = -std=c++17 $(DEBUG)
LDFLAGS = -lz -lcurl
SRC = $(wildcard source/*.cpp)
OBJ = $(SRC:.cpp=.o)
DEP = $(OBJ:.o=.d)
ifeq ($(CURL_EXISTS),false)
INSTALL_CURL = cd $(CURL) && ./configure && make && sudo make install
else
INSTALL_CURL =
endif
ifeq ($(ZLIB_EXISTS),false)
INSTALL_ZLIB = cd $(ZLIB) && ./configure && make && sudo make install
else
INSTALL_ZLIB =
endif
all:
$(INSTALL_ZLIB)
$(INSTALL_CURL)
make $(PROG)
$(PROG): $(OBJ)
$(CXX) $(OBJ) -o $@ $(LDFLAGS)
-include $(DEP)
%.d: %.cpp
$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
.PHONY: clean
clean:
rm -f $(OBJ) $(PROG)
.PHONY: cleandep
cleandep:
rm -f $(DEP)
.PHONY: install
install: $(PROG)
mkdir -p $(PREFIX)/bin
cp $< $(PREFIX)/bin/$(PROG)
.PHONY: uninstall
uninstall:
rm -f $(PREFIX)/bin/$(PROG)