This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
supercycleEngine.Makefile
267 lines (213 loc) · 7.8 KB
/
supercycleEngine.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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# @SPDX-License-Identifier LGPL-2.1-only
# @author Jerzy Jamroz ([email protected])
# @e3Template_author Jeong Han Lee ([email protected])
# @date 2020-03-20
#
# template file is generated by ./e3TemplateGenerator.bash with bf03d40
# Please look at many other _module_.Makefile in e3-* repository
#
## The following lines are mandatory, please don't change them.
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(E3_REQUIRE_TOOLS)/driver.makefile
include $(E3_REQUIRE_CONFIG)/DECOUPLE_FLAGS
# If one would like to use the module dependency restrictly,
# one should look at other modules makefile to add more
# In most case, one should ignore the following lines:
#ifneq ($(strip $(ASYN_DEP_VERSION)),)
#asyn_VERSION=$(ASYN_DEP_VERSION)
#endif
#ifneq ($(strip $(SEQUENCER_DEP_VERSION)),)
#sequencer_VERSION=$(SEQUENCER_DEP_VERSION)
#endif
## Exclude linux-ppc64e6500
##EXCLUDE_ARCHS += linux-ppc64e6500
##EXCLUDE_ARCHS += linux-corei7-poky
# APP:=calcApp
# APPDB:=$(APP)/Db
# APPSRC:=$(APP)/src
APP:=supercycleEngineApp
APPDB:=$(APP)/Db
APPSRC:=$(APP)/src
USR_INCLUDES += -I$(where_am_I)$(APPSRC)
# USR_CFLAGS += -Wno-unused-variable
# USR_CFLAGS += -Wno-unused-function
# USR_CFLAGS += -Wno-unused-but-set-variable
# USR_CPPFLAGS += -Wno-unused-variable
# USR_CPPFLAGS += -Wno-unused-function
# USR_CPPFLAGS += -Wno-unused-but-set-variable
# -g3
USR_CXXFLAGS += -std=c++11 -g3 -Wall -Wextra -Wno-deprecated-declarations -Wfatal-errors -fdiagnostics-color
# TEMPLATES += $(wildcard $(APPDB)/*.db)
# TEMPLATES += $(wildcard $(APPDB)/*.db)
# TEMPLATES += $(wildcard $(APPDB)/*.proto)
# TEMPLATES += $(wildcard $(APPDB)/*.template)
TEMPLATES += $(wildcard $(APPDB)/*.db)
# DBDINC_SRCS += $(APPSRC)/swaitRecord.c
# DBDINC_SRCS += $(APPSRC)/sseqRecord.c
# DBDINC_SRCS += $(APPSRC)/aCalcoutRecord.c
# DBDINC_SRCS += $(APPSRC)/sCalcoutRecord.c
# DBDINC_SRCS += $(APPSRC)/transformRecord.c
# DBDINC_DBDS = $(subst .c,.dbd, $(DBDINC_SRCS:$(APPSRC)/%=%))
# DBDINC_HDRS = $(subst .c,.h, $(DBDINC_SRCS:$(APPSRC)/%=%))
# DBDINC_DEPS = $(subst .c,$(DEP), $(DBDINC_SRCS:$(APPSRC)/%=%))
# HEADERS += $(APPSRC)/sCalcPostfix.h
# HEADERS += $(APPSRC)/aCalcPostfix.h
# HEADERS += $(DBDINC_HDRS)
# SOURCES += $(APPSRC)/sCalcPostfix.c
# SOURCES += $(APPSRC)/sCalcPerform.c
# SOURCES += $(APPSRC)/aCalcPostfix.c
# SOURCES += $(APPSRC)/aCalcPerform.c
# SOURCES += $(APPSRC)/calcUtil.c
# SOURCES += $(APPSRC)/myFreeListLib.c
# SOURCES += $(APPSRC)/devsCalcoutSoft.c
# SOURCES += $(APPSRC)/devaCalcoutSoft.c
# SOURCES += $(APPSRC)/subAve.c
# SOURCES += $(APPSRC)/swaitRecord.c
# SOURCES += $(APPSRC)/editSseq.st
# SOURCES += $(APPSRC)/interp.c
# SOURCES += $(APPSRC)/arrayTest.c
# SOURCES += $(APPSRC)/aCalcMonitorMem.c
# # DBDINC_SRCS should be last of the series of SOURCES
# SOURCES += $(DBDINC_SRCS)
#SOURCES += $(APPSRC)/devAiSecond.c
# SRC libraries
SOURCES += $(APPSRC)/deps/dlog/dlog.cpp
SOURCES += $(APPSRC)/deps/dperf/dperf.cpp
SOURCES += $(APPSRC)/deps/cmn/cmnbase.cpp
SOURCES += $(APPSRC)/sce/dbuf.cpp
SOURCES += $(APPSRC)/sce/seq.cpp
#SOURCES += $(APPSRC)/sce/sce.cpp
SOURCES += $(APPSRC)/sce/cycle.cpp
SOURCES += $(APPSRC)/sce/scenv.cpp
#SOURCES += $(APPSRC)/io/iobase.cpp
SOURCES += $(APPSRC)/sce/yml.cpp
SOURCES += $(APPSRC)/sce/csv.cpp
SOURCES += $(APPSRC)/sce/reg.cpp
# Devs
SOURCES += $(APPSRC)/dev/object.cpp
SOURCES += $(APPSRC)/dev/devExtension.cpp
SOURCES += $(APPSRC)/dev/devEngine.cpp
SOURCES += $(APPSRC)/dev/devEngineExt.cpp
SOURCES += $(APPSRC)/dev/devASubBuf.cpp
SOURCES += $(APPSRC)/dev/devStringoutCtrl.cpp
SOURCES += $(APPSRC)/dev/cmdMapStrOut.cpp
SOURCES += $(APPSRC)/dev/devStringIOObjProp.cpp
SOURCES += $(APPSRC)/dev/devIO.cpp
# Env last
#SOURCES += $(APPSRC)/dev/iocVars.cpp
# Deploy build versions
HEADERS += $(APPSRC)/version.h
object$(DEP):
$(PERL) -I$(EPICS_BASE)/lib/perl $(where_am_I)$(APPSRC)/genVersionHeader.pl -t "" -V $(E3_MODULE_VERSION) -N SCE_VERSION $(where_am_I)$(APPSRC)/version.h
#$(PERL) -I$(EPICS_BASE)/lib/perl $(where_am_I)$(APPSRC)/genVersionHeader.pl -t "" -V $(E3_MODULE_VERSION) -N SCE_VERSION $^
# version.h:
# $(RM) $@
# $(PERL) -I$(EPICS_BASE)/lib/perl $(where_am_I)$(APPSRC)/genVersionHeader.pl -t "" -V $(E3_MODULE_VERSION) -N SCE_VERSION $(where_am_I)$(APPSRC)/$@
# DBDS += $(APPSRC)/calcSupport_LOCAL.dbd
# DBDS += $(APPSRC)/calcSupport_withSNCSEQ.dbd
# DBDS += $(APPSRC)/calcSupport_withSSCAN.dbd
# DBDS += $(APPSRC)/aiSecond.dbd
# DBDS += $(APPSRC)/base.dbd
DBDS += $(APPSRC)/dev/devs.dbd
#
# $(DBDINC_DEPS): $(DBDINC_HDRS)
#
# .dbd.h:
# $(DBTORECORDTYPEH) $(USR_DBDFLAGS) -o $@ $<
#
# .PHONY: $(DBDINC_DEPS) .dbd.h
#
#
# ## xxxRecord.dbd Local Codes
# DBDINC_SUFF = cpp
# DBDINC_PATH = $(OPCUASRC)
# DBDINC_SRCS = $(DBDINC_PATH)/opcuaItemRecord.$(DBDINC_SUFF)
# ## xxxRecord.dbd Generic Codes : BEGIN
# DBDINC_DBDS = $(subst .$(DBDINC_SUFF),.dbd, $(DBDINC_SRCS:$(DBDINC_PATH)/%=%))
# DBDINC_HDRS = $(subst .$(DBDINC_SUFF),.h, $(DBDINC_SRCS:$(DBDINC_PATH)/%=%))
# DBDINC_DEPS = $(subst .$(DBDINC_SUFF),$(DEP), $(DBDINC_SRCS:$(DBDINC_PATH)/%=%))
# HEADERS += $(DBDINC_HDRS)
# SOURCES += $(DBDINC_SRCS)
# $(DBDINC_DEPS): $(DBDINC_HDRS)
# .dbd.h:
# $(DBTORECORDTYPEH) $(USR_DBDFLAGS) -o $@ $<
# .PHONY: $(DBDINC_DEPS) .dbd.h
# ## Record.dbd Generic codes : END
# The following lines could be useful if one uses the external lib
#
# Examples...
#
# USR_CFLAGS += -fPIC
# USR_CFLAGS += -DDEBUG_PRINT
# USR_CPPFLAGS += -DDEBUG_PRINT
# USR_CPPFLAGS += -DUSE_TYPED_RSET
# USR_INCLUDES += -I/usr/include/libusb-1.0
# USR_LDFLAGS += -lusb-1.0
# USR_LDFLAGS += -L /opt/etherlab/lib
# USR_LDFLAGS += -lethercat
# USR_LDFLAGS += -Wl,-rpath=/opt/etherlab/lib
#USR_LDFLAGS += -L /usr/local/lib
#USR_LDFLAGS += -lyaml-cpp
USR_LDFLAGS += -Wl,-rpath=/usr/local/lib
## SYSTEM LIBS
##
# USR_LIBS += boost_regex
# USR_LIBS += readline
# USR_LIBS += xml2
ifeq ($(T_A),linux-ppc64e6500)
USR_INCLUDES += -I$(SDKTARGETSYSROOT)/usr/local/include/yaml-cpp
else ifeq ($(T_A),linux-corei7-poky)
USR_INCLUDES += -I$(SDKTARGETSYSROOT)/usr/local/include/yaml-cpp
else
USR_INCLUDES += -I/usr/local/include/yaml-cpp
endif
## LIB_SYS_LIBS += xml2
## USR_SYS_LIBS += jsoncpp
# LIB_SYS_LIBS += jsoncpp
LIB_SYS_LIBS += yaml-cpp
#
#
# ifeq ($(T_A),linux-x86_64)
# USR_LDFLAGS += -Wl,--enable-new-dtags
# USR_LDFLAGS += -L$(E3_MODULES_VENDOR_LIBS_LOCATION)
# USR_LDFLAGS += -Wl,-rpath,"\$$ORIGIN/../../../../../siteLibs/vendor/$(E3_MODULE_NAME)/$(E3_MODULE_VERSION)"
# USR_LDFLAGS += -lflycapture
# endif
# According to its makefile
# VENDOR_LIBS += $(SUPPORT)/os/linux-x86_64/libflycapture.so.2.8.3.1
# VENDOR_LIBS += $(SUPPORT)/os/linux-x86_64/libflycapture.so.2
# VENDOR_LIBS += $(SUPPORT)/os/linux-x86_64/libflycapture.so
SCRIPTS += $(wildcard ../iocsh/*.iocsh)
## This RULE should be used in case of inflating DB files
## db rule is the default in RULES_DB, so add the empty one
## Please look at e3-mrfioc2 for example.
db:
.PHONY: db
#
# USR_DBFLAGS += -I . -I ..
# USR_DBFLAGS += -I $(EPICS_BASE)/db
# USR_DBFLAGS += -I $(APPDB)
#
# SUBS=$(wildcard $(APPDB)/*.substitutions)
# TMPS=$(wildcard $(APPDB)/*.template)
#
# db: $(SUBS) $(TMPS)
# $(SUBS):
# @printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
# @rm -f $(basename $(@)).db.d $(basename $(@)).db
# @$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db -S $@ > $(basename $(@)).db.d
# @$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db -S $@
# $(TMPS):
# @printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
# @rm -f $(basename $(@)).db.d $(basename $(@)).db
# @$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db $@ > $(basename $(@)).db.d
# @$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db $@
#
# .PHONY: db $(SUBS) $(TMPS)
vlibs:
.PHONY: vlibs
# vlibs: $(VENDOR_LIBS)
# $(VENDOR_LIBS):
# $(QUIET)$(SUDO) install -m 755 -d $(E3_MODULES_VENDOR_LIBS_LOCATION)/
# $(QUIET)$(SUDO) install -m 755 $@ $(E3_MODULES_VENDOR_LIBS_LOCATION)/
# .PHONY: $(VENDOR_LIBS) vlibs