-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.common
143 lines (115 loc) · 4.08 KB
/
Makefile.common
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# -----------------------------------------------------------------------------
#
# ChiLA common makefile definitions
#
# Original Author: Stephan Fegan
# $Author: matthew $
# $Date: 2010/04/25 01:27:12 $
# $Revision: 1.39 $
# $Tag$
#
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# VERITAS DEFINES AND INCLUDES
# -----------------------------------------------------------------------------
ifndef VERITASDIR
VERITASDIR = /usr/local/veritas
endif
VERITASBIN = $(VERITASDIR)/bin
VERITASCFLAGS = -I$(VERITASDIR)/include
VERITASLDFLAGS = -L$(VERITASDIR)/lib
# -----------------------------------------------------------------------------
# VBF
# -----------------------------------------------------------------------------
ifdef VBFSYS
VBFBIN := $(VBFSYS)/bin/
else
VBFBIN := $(VERITASBIN)/
endif
VBFCONFIG = $(VBFBIN)vbfConfig
VBFCFLAGS := $(shell $(VBFCONFIG) --cppflags)
VBFLDFLAGS := $(shell $(VBFCONFIG) --ldflags)
VBFLIBS := $(shell $(VBFCONFIG) --libs)
# -----------------------------------------------------------------------------
# CHILA DEFINES AND INCLUDES
# -----------------------------------------------------------------------------
CHILACFLAGS = -fPIC $(MYSQLINC) \
-I$(CHILADIR)/VSCommon \
-I$(CHILADIR)/VSUtility \
-I$(CHILADIR)/VSSimDB \
-I$(CHILADIR)/Physics \
-I$(CHILADIR)/VSShower \
-I$(CHILADIR)/VSOptics \
-I$(CHILADIR)/VSAnalysis \
-I$(CHILADIR)/VSNSpace \
-I$(CHILADIR)/VSDataReduction \
-I$(CHILADIR)/SEphem \
-I.
CHILALDFLAGS = -fPIC -L$(CHILADIR)/VSOptics \
-L$(CHILADIR)/VSCommon \
-L$(CHILADIR)/VSUtility \
-L$(CHILADIR)/VSSimDB \
-L$(CHILADIR)/VSShower \
-L$(CHILADIR)/VSAnalysis \
-L$(CHILADIR)/Physics \
-L$(CHILADIR)/VSNSpace \
-L$(CHILADIR)/VSDataReduction \
-L$(CHILADIR)/SEphem \
-L.
CHILADEFFLAGS = -D__STDC_LIMIT_MACROS \
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
-D_FILE_OFFSET_BITS=64 \
-D_LARGEFILE_SOURCE -DUSEALLOCA \
-D H5_USE_16_API
VSLIBS = -lVSAnalysis -lVSShower -lVSOptics -lVSSimDB -lVSUtility -lPhysics -lVSCommon -lpthread
# -----------------------------------------------------------------------------
# CORSIKA
# -----------------------------------------------------------------------------
CORSIKA_DIR = $(HOME)/CORSIKA/corsika
CORSIKA_DATA_DIR = $(CORSIKA_DIR)/run
ifdef BERNLOHR_PREFIX
BERNLOHR_IACT_PREFIX = libbern_a-
BERNLOHR_IACT_PREFIX = libiact_a-
else
BERNLOHR_IACT_PREFIX =
BERNLOHR_IACT_PREFIX =
endif
BERNLOHR_DIR = $(CORSIKA_DIR)/bernlohr
FLUKA_DIR = $(HOME)/CORSIKA/flukapro
# -----------------------------------------------------------------------------
# Compiler/Linker Options
# -----------------------------------------------------------------------------
################################## INTEL C++ ##################################
#CXX = /opt/intel_cc_80/bin/icc
#CXXFLAGS = -g -xN -O3 -Wall $(INCLUDE_DIRS)
#LDFLAGS = -static -g -Kc++ -xN -O3 -Wall $(LIB_DIRS)
################################### GNU C++ ###################################
ifndef OPTFLAGS
OPTFLAGS = -O3 -g
endif
ifndef CXX
CXX = g++
CC = gcc
LD = g++
endif
CXXFLAGS = $(OPTFLAGS) -Wall $(CHILADEFFLAGS) $(CHILACFLAGS) $(VERITASCFLAGS)
LDFLAGS = $(CHILALDFLAGS) $(VERITASLDFLAGS)
#CXXFLAGS = -g -fno-default-inline -fno-inline -m32 -Wall $(INCLUDE_DIRS) $(DEFINES)
#LDFLAGS = -static -g -fno-default-inline -fno-inline -m32 -Wall $(LIB_DIRS)
#LDFLAGS = -g -fno-default-inline -fno-inline -m32 -Wall $(LIB_DIRS)
# -----------------------------------------------------------------------------
# Other Libraries
# -----------------------------------------------------------------------------
ifdef MYSQLOLD
MYSQLINC = $(shell mysql_config --cflags)
else
MYSQLINC = $(shell mysql_config --include)
endif
MYSQLLIBS = $(shell mysql_config --libs)
MYSQLLIBS_STATIC = -Wl,-\( $(shell mysql_config --libs) -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lpthread -ldl -Wl,-\)
ifdef HDF5DIR
CHILACFLAGS += -I$(HDF5DIR)/include -L$(HDF5DIR)/lib
CHILALDFLAGS += -L$(HDF5DIR)/lib
endif
H5LIBS = -lhdf5 -lz