File: Makefile

package info (click to toggle)
libstatgen 1.0.15-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,588 kB
  • sloc: cpp: 49,624; ansic: 1,408; makefile: 320; sh: 60
file content (123 lines) | stat: -rwxr-xr-x 2,617 bytes parent folder | download | duplicates (2)
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
  # For Linux, add a couple extra warnings
  #
  # trying to strike the right balance on error/warning
  # handling is difficult, but here we make most everthing
  # an error, but allow unused results and variables for the
  # time being.
  #
  # Disable format-truncation check because StringBasics specifically tests
  # to make sure snprintf truncates as expected.
  USER_WARNINGS ?= -Wno-format-truncation $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-strict-overflow" ; fi)
#  USER_WARNINGS ?= -Werror $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-strict-overflow" ; fi)
#-Wno-strict-overflow
# -Wno-unused-variable $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-unused-result" ; fi)
endif
ifeq ($(UNAME), Darwin)
  # Mac OS, nothing to add.
  # -Wall contain -Wunused-variable and -Wunused-result from 'man gcc'
endif

#USER_COMPILE_VARS = -D_NO_PHONEHOME

TOOLBASE=\
	BaseAsciiMap \
	BaseQualityHelper \
	BaseUtilities \
	BasicHash \
	BgzfFileType \
	BgzfFileTypeRecovery \
	CharBuffer \
	Chromosome \
	Cigar \
	CigarRoller \
	Error \
	ErrorHandler \
	FileType \
	FortranFormat \
	GenomeSequence \
	GenotypeLists \
	glfHandler \
	GzipFileType \
	GzipHeader \
	Hash \
	IndexBase \
	Input \
	InputFile \
	IntArray \
	IntHash \
	LongLongCounter \
	MapFunction \
	MathMatrix \
	MathVector \
	MemoryAllocators \
	MemoryInfo \
	MemoryMapArray \
	MemoryMap \
	MiniDeflate \
	NonOverlapRegions \
	Parameters \
	PedigreeAlleleFreq \
	Pedigree \
	PedigreeDescription \
	PedigreeFamily \
	PedigreeGlobals \
	PedigreePerson \
	PhoneHome \
	QuickIndex \
	Random \
	ReferenceSequence \
	SmithWaterman \
	Sort \
	STLUtilities \
	StatGenStatus \
	StringAlias \
	StringArray \
	StringBasics \
	StringHash \
	StringMap \
	Tabix \
	UncompressedFileType

SRCONLY=\
	PedigreeLoader.cpp \
	PedigreeTrim.cpp \
	PedigreeTwin.cpp 

HDRONLY= \
	Constant.h \
	CSG_MD5.h \
	Generic.h \
	GenomeSequenceHelpers.h \
	GreedyTupleAligner.h \
	InplaceMerge.h \
	LongHash.h \
	LongInt.h \
	MathConstant.h \
	PackedVector.h \
	PedigreeAlleles.h \
	Performance.h \
	ReusableVector.h \
	SimpleStats.h \
	TrimSequence.h \
	UnitTest.h

include ../Makefiles/Makefile.lib


CPP_TESTS := $(shell grep -l 'if defined(TEST)' *cpp)
selftest: 
	@for i in $(CPP_TESTS); do \
		if [ "XXX$$i" = XXX ] ;\
		then \
		    continue; \
		fi;\
		(echo "building in self test $$i"; g++ -DTEST -D__STDC_LIMIT_MACROS -o test_$$i $$i  -L. -lcsg -lm -lz -lssl ; ./test_$$i) ; \
		if [ $$? -ne 0 ] ; \
		then \
		    echo "make stopped because of errors." ; \
		    break ; \
		fi \
	done