This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathecmc.Makefile
172 lines (147 loc) · 5.6 KB
/
ecmc.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
#
# Copyright (c) 2019 Jeong Han Lee
# Copyright (c) 2017 - 2019 European Spallation Source ERIC
#
# The program is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 2 of the
# License, or any newer version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt
#
#
# Author : Jeong Han Lee
# email : jeonghan.lee@gmail.com
# Date : Tuesday, September 17 11:30:53 CEST 2019
# version : 0.0.7
#
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(E3_REQUIRE_TOOLS)/driver.makefile
include $(E3_REQUIRE_CONFIG)/DECOUPLE_FLAGS
ifneq ($(strip $(ASYN_DEP_VERSION)),)
asyn_VERSION=$(ASYN_DEP_VERSION)
endif
ifneq ($(strip $(EXPRTK_DEP_VERSION)),)
exprtk_VERSION=$(EXPRTK_DEP_VERSION)
endif
ifneq ($(strip $(MOTOR_DEP_VERSION)),)
motor_VERSION=$(MOTOR_DEP_VERSION)
endif
EXCLUDE_ARCHS += linux-ppc64e6500
EXCLUDE_ARCHS += linux-corei7-poky
ifeq ($(T_A),linux-x86_64)
# Assume that the etherlab user library is done via
# https://github.com/icshwi/etherlabmaster
USR_INCLUDES += -I/opt/etherlab/include
USR_CFLAGS += -fPIC
USR_LDFLAGS += -L /opt/etherlab/lib
USR_LDFLAGS += -lethercat
USR_LDFLAGS += -Wl,-rpath=/opt/etherlab/lib
else
ifeq ($(T_A),linux-arm)
# Assume that the etherlab user library is done via
# https://github.com/icshwi/etherlabmaster
USR_INCLUDES += -I/opt/etherlab/include
USR_CFLAGS += -fPIC
USR_LDFLAGS += -L /opt/etherlab/lib
USR_LDFLAGS += -lethercat
USR_LDFLAGS += -Wl,-rpath=/opt/etherlab/lib
else
# Assume that the etherlab user library is done via
# Yocto ESS Linux bb recipe
USR_INCLUDES += -I$(SDKTARGETSYSROOT)/usr/include/etherlab
USR_CFLAGS += -fPIC
USR_LDFLAGS += -L $(SDKTARGETSYSROOT)/usr/lib/etherlab
USR_LDFLAGS += -lethercat
USR_LDFLAGS += -Wl,-rpath=$(SDKTARGETSYSROOT)/usr/lib/etherlab
USR_LDFLAGS += -lstdc++
endif
endif
APP:=devEcmcSup
APPSRC:=$(APP)
APPSRC_ETHERCAT:=$(APPSRC)/ethercat
APPSRC_MOTION:=$(APPSRC)/motion
APPSRC_COM:=$(APPSRC)/com
APPSRC_MAIN:=$(APPSRC)/main
APPSRC_PLC:=$(APPSRC)/plc
APPSRC_MISC:=$(APPSRC)/misc
APPSRC_MOTOR:=$(APPSRC)/motor
APPSRC_PLUGIN:=$(APPSRC)/plugin
USR_INCLUDES += -I$(where_am_I)$(APPSRC)
SOURCES += $(APPSRC_MAIN)/ecmcGeneral.cpp
SOURCES += $(APPSRC_MAIN)/ecmcError.cpp
SOURCES += $(APPSRC_MAIN)/ecmcMainThread.cpp
SOURCES += $(APPSRC_COM)/ecmcCom.cpp
SOURCES += $(APPSRC_COM)/ecmcOctetIF.c
SOURCES += $(APPSRC_COM)/ecmcCmdParser.c
SOURCES += $(APPSRC_COM)/ecmcAsynPortDriver.cpp
SOURCES += $(APPSRC_COM)/ecmcAsynPortDriverUtils.cpp
SOURCES += $(APPSRC_COM)/ecmcAsynDataItem.cpp
SOURCES += $(APPSRC_COM)/ecmcDataItem.cpp
SOURCES += $(APPSRC_MOTION)/ecmcMotion.cpp
SOURCES += $(APPSRC_MOTION)/ecmcAxisBase.cpp
SOURCES += $(APPSRC_MOTION)/ecmcAxisReal.cpp
SOURCES += $(APPSRC_MOTION)/ecmcAxisVirt.cpp
SOURCES += $(APPSRC_MOTION)/ecmcDriveBase.cpp
SOURCES += $(APPSRC_MOTION)/ecmcDriveStepper.cpp
SOURCES += $(APPSRC_MOTION)/ecmcDriveDS402.cpp
SOURCES += $(APPSRC_MOTION)/ecmcEncoder.cpp
SOURCES += $(APPSRC_MOTION)/ecmcFilter.cpp
SOURCES += $(APPSRC_MOTION)/ecmcMonitor.cpp
SOURCES += $(APPSRC_MOTION)/ecmcPIDController.cpp
SOURCES += $(APPSRC_MOTION)/ecmcAxisSequencer.cpp
SOURCES += $(APPSRC_MOTION)/ecmcTrajectoryTrapetz.cpp
SOURCES += $(APPSRC_MOTION)/ecmcAxisData.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEthercat.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEc.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcEntry.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcPdo.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcSDO.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcSlave.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcSyncManager.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcEntryLink.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcAsynLink.cpp
SOURCES += $(APPSRC_ETHERCAT)/ecmcEcMemMap.cpp
SOURCES += $(APPSRC_MISC)/ecmcMisc.cpp
SOURCES += $(APPSRC_MISC)/ecmcEvent.cpp
SOURCES += $(APPSRC_MISC)/ecmcEventConsumer.cpp
SOURCES += $(APPSRC_MISC)/ecmcDataRecorder.cpp
SOURCES += $(APPSRC_MISC)/ecmcDataStorage.cpp
SOURCES += $(APPSRC_MISC)/ecmcCommandList.cpp
SOURCES += $(APPSRC_PLC)/ecmcPLC.cpp
SOURCES += $(APPSRC_PLC)/ecmcPLCTask.cpp
SOURCES += $(APPSRC_PLC)/ecmcPLCDataIF.cpp
SOURCES += $(APPSRC_PLC)/ecmcPLCMain.cpp
SOURCES += $(APPSRC_MOTOR)/ecmcMotorRecordController.cpp
SOURCES += $(APPSRC_MOTOR)/ecmcMotorRecordAxis.cpp
SOURCES += $(APPSRC_PLUGIN)/ecmcPlugin.cpp
SOURCES += $(APPSRC_PLUGIN)/ecmcPluginLib.cpp
SOURCES += $(APPSRC_PLUGIN)/ecmcPluginClient.cpp
SOURCES += gitversion.c
HEADERS += $(APPSRC_PLUGIN)/ecmcPlugin.h
HEADERS += $(APPSRC_PLUGIN)/ecmcPluginDefs.h
HEADERS += $(APPSRC_PLUGIN)/ecmcPluginClient.h
HEADERS += $(APPSRC_COM)/ecmcAsynPortDriver.h
HEADERS += $(APPSRC_COM)/ecmcAsynDataItem.h
HEADERS += $(APPSRC_COM)/ecmcDataItem.h
HEADERS += $(APPSRC_COM)/ecmcAsynPortDriverUtils.h
HEADERS += $(APPSRC_MAIN)/ecmcGeneral.h
HEADERS += $(APPSRC_MAIN)/ecmcDefinitions.h
HEADERS += $(APPSRC_MISC)/ecmcMisc.h
HEADERS += $(APPSRC_MOTION)/ecmcMotion.h
HEADERS += $(APPSRC_ETHERCAT)/ecmcEthercat.h
HEADERS += $(APPSRC_PLC)/ecmcPLC.h
DBDS += $(APPSRC_COM)/ecmcController.dbd
DBDS += $(APPSRC_MOTOR)/ecmcMotorRecordSupport.dbd
gitversion.c:
$(QUIET)$(RM) $@
$(QUIET)sh $(where_am_I)tools/gitversion.sh $@
.PHONY: vlibs db
db:
vlibs: