File: Makefile

package info (click to toggle)
vcftools 0.1.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,680 kB
  • ctags: 1,215
  • sloc: cpp: 12,118; perl: 10,973; ansic: 1,467; pascal: 1,064; makefile: 67; php: 57; sh: 12
file content (56 lines) | stat: -rw-r--r-- 1,473 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
# Make file for vcftools
# Author: Adam Auton
# ($Revision: 230 $)

# Compiler
CC = gcc
CPP = g++
# Output executable
EXECUTABLE = vcftools
# Flag used to turn on compilation of PCA routines
ifndef VCFTOOLS_PCA
	VCFTOOLS_PCA = 0
endif
# Compiler flags
CFLAGS += -O2
#CFLAGS = -Wall -O2 -pg -m64
CPPFLAGS += -O2 -D_FILE_OFFSET_BITS=64
#CPPFLAGS = -O2 -Wall -pg -D_FILE_OFFSET_BITS=64
# Included libraries (zlib)
LIB = -lz 
#LIB = -lz -I/opt/local/include/ -L/opt/local/lib/

OBJS = vcftools.o bcf_file.o vcf_file.o variant_file.o \
	header.o bcf_entry.o vcf_entry.o entry.o entry_getters.o entry_setters.o \
	vcf_entry_setters.o bcf_entry_setters.o entry_filters.o variant_file_filters.o variant_file_output.o parameters.o \
	variant_file_format_convert.o variant_file_diff.o output_log.o bgzf.o gamma.o

ifeq ($(VCFTOOLS_PCA), 1)
	# Define flag for PCA routine compilation
	CPPFLAGS += -DVCFTOOLS_PCA
	# Add LAPACK library
	LIB += -llapack	
	# Add PCA source code
	OBJS+= dgeev.o
endif

vcftools: $(OBJS)
	$(CPP) $(CPPFLAGS) $(OBJS) $(LDFLAGS) -o vcftools $(LIB)
ifdef BINDIR
	cp $(CURDIR)/$@ $(BINDIR)/$@
endif

bgzf: bgzf.c
	$(CC) -c $(CFLAGS) $(FLAGS) bgzf.c $(LIB) -o bgzf.o

# pull in dependency info for *existing* .o files
-include $(OBJS:.o=.d)

%.o: %.cpp
	$(CPP) -c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.cpp -o $*.o
	$(CPP) -MM $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.cpp > $*.d

# remove compilation products
clean:
	@rm -f vcftools *.o *.d
	@rm -f $(BINDIR)/vcftools