-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.common
180 lines (144 loc) · 4.27 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# -----------------------------------------------------------------------------
#
# Serial tracking common makefile definitions
#
# Original Author: Stephen Fegan
# $Author: aune $
# $Date: 2011/04/08 05:10:25 $
# $Revision: 2.10 $
# $Tag$
#
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# COMPILER FLAGS
# -----------------------------------------------------------------------------
COMMONCFLAGS = -I. -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNOHDF5
CXX = g++
ARCHCFLAGS = -Wall -g -fpermissive
LD = g++
ARCHLDFLAGS =
ARCHSOFLAGS = -shared
CFLAGS = $(COMMONCFLAGS) $(ARCHCFLAGS) \
$(QTCFLAGS) $(QWTCFLAGS) $(MYSQLCFLAGS) $(ZTHREADCFLAGS)
CXXFLAGS = $(COMMONCFLAGS) $(ARCHCFLAGS) \
$(QTCFLAGS) $(QWTCFLAGS) $(MYSQLCFLAGS) $(ZTHREADCFLAGS) \
$(OMNICFLAGS)
LDFLAGS = $(COMMONLDFLAGS) $(ARCHLDFLAGS) \
$(QTLDFLAGS) $(QWTLDFLAGS) $(MYSQLLDFLAGS) $(ZTHREADLDFLAGS) \
$(OMNILDFLAGS)
# -----------------------------------------------------------------------------
# VDB FLAGS
# -----------------------------------------------------------------------------
ifdef VERITASBASE
COMMONCFLAGS += -I$(VERITASBASE)/include
COMMONLDFLAGS = -L$(VERITASBASE)/lib
endif
# -----------------------------------------------------------------------------
# QT FLAGS
# -----------------------------------------------------------------------------
ifdef QTDIR
QTBIN := $(QTDIR)/bin/
else
QTBIN :=
endif
ifdef QTNOMT
QTLIB := -lqt
else
QTLIB := -lqt-mt
endif
QTCFLAGS :=
QTLDFLAGS :=
ifdef QTINCDIR
QTCFLAGS += -I$(QTINCDIR)
else
ifdef QTDIR
QTCFLAGS += -I$(QTDIR)/include
endif
endif
ifdef QTDIR
QTLDFLAGS += -L$(QTDIR)/lib
endif
QTLDFLAGS += $(QTLIB)
MOC = $(QTBIN)moc
UIC = $(QTBIN)uic
# -----------------------------------------------------------------------------
# QWT FLAGS
# -----------------------------------------------------------------------------
QWTCFLAGS :=
QWTLDFLAGS :=
ifndef NOQWT
ifndef QWTDIR
QWTDIR := /usr/local
endif
ifndef QWTLIBNAME
QWTLIBNAME := qwt
endif
ifdef QWTINCDIR
QWTCFLAGS += -I$(QWTINCDIR)
else
QWTCFLAGS += -I$(QWTDIR)/include/qwt
endif
ifdef QWTLIBDIR
QWTLDFLAGS += -L$(QWTLIBDIR)
else
QWTLDFLAGS += -L$(QWTDIR)/lib
endif
QWTLDFLAGS += -l$(QWTLIBNAME)
else
QWTCFLAGS += -DGUI_NO_QWT
endif
# -----------------------------------------------------------------------------
# MYSQL FLAGS
# -----------------------------------------------------------------------------
ifdef MYSQLDIR
MYSQLCFLAGS := $(shell $(MYSQLDIR)/mysql_config --cflags)
MYSQLLDFLAGS := $(shell $(MYSQLDIR)/mysql_config --libs)
else
MYSQLCFLAGS := $(shell mysql_config --cflags)
MYSQLLDFLAGS := $(shell mysql_config --libs)
endif
# -----------------------------------------------------------------------------
# ZTHREADS
# -----------------------------------------------------------------------------
ifdef ZTHREADDIR
ZTHREADCFLAGS := -I$(ZTHREADDIR)/include
ZTHREADLDFLAGS := -L$(ZTHREADDIR)/lib -lZThread -lpthread
else
ZTHREADLDFLAGS := -lZThread -lpthread
endif
# -----------------------------------------------------------------------------
# IDL
# -----------------------------------------------------------------------------
ifndef OMNIORBDIR
OMNIORBDIR := /usr/local
endif
ifdef OMNIEVENTDIR
OMNILDFLAGS += -L$(OMNIEVENTDIR)/lib -lomniEvents
else
OMNILDFLAGS += -lomniEvents
endif
ifndef OMNIORBINCDIR
OMNIORBINCDIR := $(OMNIORBDIR)/include/omniORB4
endif
ifndef OMNIORBLIBDIR
OMNIORBLIBDIR := $(OMNIORBDIR)/lib
endif
ifndef OMNIORBBINDIR
OMNIORBBINDIR := $(OMNIORBDIR)/bin
endif
IDL := $(OMNIORBBINDIR)/omniidl
IDLFLAGS := -bcxx -Wbh=.h -Wbs=.cpp -Wbd=_dyn.cpp -Wba
OMNICFLAGS := -I$(OMNIORBINCDIR)
OMNILDFLAGS := -L$(OMNIORBLIBDIR) -lomniDynamic4 -lomniORB4 -lomniEvents
ifdef OMNIEVENTINCDIR
OMNICFLAGS += -I$(OMNIEVENTINCDIR)
else
OMNICFLAGS += -I$(OMNIORBINCDIR)/COS
endif
# -----------------------------------------------------------------------------
# TEST
# -----------------------------------------------------------------------------
all:
sjftest:
echo $(CFLAGS)
echo $(LDFLAGS)