-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.18 KB
/
Makefile
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
###############################################################
#
# Makefile for sampling tools
#
###############################################################
CXX = g++
INSTALLDIR = /usr/local
# sample SNPs tool
SMPOUT = sampleSNPs
# sample LD tool
LDOUT = sampleLD
# library
LIBOUT = libsampFiles.a
CXXFLAGS = -O3 -march=native -std=c++11
SMPOBJ = varfiles.o random.o
LDOBJ = varfiles.o random.o populations.o
all : $(SMPOUT) $(LDOUT) $(LIBOUT)
.PHONY : all
install : $(LIBOUT) $(LDOUT) $(SMPOUT)
-cp -v $(LIBOUT) $(INSTALLDIR)/lib
-cp -v *.hpp $(INSTALLDIR)/include
-cp -v $(LDOUT) $(INSTALLDIR)/bin
-cp -v $(SMPOUT) $(INSTALLDIR)/bin
.PHONY : install
$(SMPOUT) : sampleSNPs.cpp $(SMPOBJ)
$(CXX) sampleSNPs.cpp $(SMPOBJ) -o $(SMPOUT) $(CXXFLAGS)
$(LDOUT) : sampleLD.cpp $(LDOBJ)
$(CXX) sampleLD.cpp $(LDOBJ) -o $(LDOUT) $(CXXFLAGS)
$(LIBOUT) : $(LDOBJ)
ar crv $(LIBOUT) $(LDOBJ)
random.o : random.cpp random.hpp
$(CXX) -c random.cpp $(CXXFLAGS)
populations.o : populations.cpp populations.hpp
$(CXX) -c populations.cpp $(CXXFLAGS)
varfiles.o : varfiles.hpp varfiles.cpp populations.o random.o
$(CXX) -c varfiles.cpp $(CXXFLAGS)
.PHONY : clean
clean :
-rm *.o $(SMPOUT) $(LDOUT)