-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.in
86 lines (70 loc) · 3.01 KB
/
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
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
CXXFLAGS += -std=c++14 -Isrc -I@protobuf@/include -I@capnp@/include
UNAME_S=$(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++
else
CXXFLAGS += -include src/harvest/memcpyLink.h -Wl,--wrap=memcpy
CFLAGS += -include src/harvest/memcpyLink.h
endif
SOURCES=\
src/harvest/AnnotationList.cpp \
src/harvest/harvest.cpp \
src/harvest/HarvestIO.cpp \
src/harvest/LcbList.cpp \
src/harvest/parse.cpp \
src/harvest/PhylogenyTree.cpp \
src/harvest/PhylogenyTreeNode.cpp \
src/harvest/ReferenceList.cpp \
src/harvest/TrackList.cpp \
src/harvest/VariantList.cpp \
OBJECTS=$(SOURCES:.cpp=.o) src/harvest/pb/harvest.pb.o src/harvest/capnp/harvest.capnp.o
all : harvesttools libharvest.a
harvesttools : libharvest.a src/harvest/memcpyWrap.o
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o harvesttools src/harvest/memcpyWrap.o libharvest.a @protobuf@/lib/libprotobuf.a @capnp@/lib/libcapnp.a @capnp@/lib/libkj.a -lstdc++ -lz -lm -lpthread
libharvest.a : $(OBJECTS)
ar -cr libharvest.a $(OBJECTS)
ranlib libharvest.a
.SUFFIXES :
%.o : %.cpp src/harvest/pb/harvest.pb.h src/harvest/capnp/harvest.capnp.h
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.o : %.c++
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.o : %.cc
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
src/harvest/memcpyWrap.o : src/harvest/memcpyWrap.c
$(CC) $(CFLAGS) -c -o $@ $<
src/harvest/pb/harvest.pb.cc src/harvest/pb/harvest.pb.h : src/harvest/pb/harvest.proto
cd src; @protobuf@/bin/protoc --cpp_out . harvest/pb/harvest.proto
src/harvest/capnp/harvest.capnp.c++ src/harvest/capnp/harvest.capnp.h : src/harvest/capnp/harvest.capnp
cd src/harvest/capnp;export PATH=@capnp@/bin/:${PATH};capnp compile -I @capnp@/include -oc++ harvest.capnp
install : libharvest.a
mkdir -p @prefix@/bin/
mkdir -p @prefix@/lib/
mkdir -p @prefix@/include/
mkdir -p @prefix@/include/harvest
mkdir -p @prefix@/include/harvest/capnp
mkdir -p @prefix@/include/harvest/pb
ln -sf `pwd`/harvesttools @prefix@/bin/
ln -sf `pwd`/libharvest.a @prefix@/lib/
ln -sf `pwd`/src/harvest/exceptions.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/HarvestIO.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/capnp/harvest.capnp.h @prefix@/include/harvest/capnp/
ln -sf `pwd`/src/harvest/pb/harvest.pb.h @prefix@/include/harvest/pb/
ln -sf `pwd`/src/harvest/ReferenceList.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/AnnotationList.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/parse.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/PhylogenyTree.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/PhylogenyTreeNode.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/TrackList.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/LcbList.h @prefix@/include/harvest/
ln -sf `pwd`/src/harvest/VariantList.h @prefix@/include/harvest/
clean :
-rm harvesttools
-rm libharvest.a
-rm src/harvest/*.o
-rm src/harvest/capnp/*.o
-rm src/harvest/capnp/*.c++
-rm src/harvest/capnp/*.h
-rm src/harvest/pb/*.o
-rm src/harvest/pb/*.cc
-rm src/harvest/pb/*.h