1 ################################################################################
5 ################################################################################
7 OPENPOWERLINK_VERSION
= V2.5
.0
8 OPENPOWERLINK_SITE
= http
://downloads.sourceforge.net
/project
/openpowerlink
/openPOWERLINK
/$(OPENPOWERLINK_VERSION
)
9 OPENPOWERLINK_SOURCE
= openPOWERLINK_
$(OPENPOWERLINK_VERSION
).
tar.gz
10 OPENPOWERLINK_LICENSE
= BSD-2c
, GPLv2
11 OPENPOWERLINK_LICENSE_FILES
= license.md
13 OPENPOWERLINK_INSTALL_STAGING
= YES
15 # The archive has no leading component.
16 OPENPOWERLINK_STRIP_COMPONENTS
= 0
18 OPENPOWERLINK_MN_ONOFF
= $(if
$(BR2_PACKAGE_OPENPOWERLINK_MN
),ON
,OFF
)
19 OPENPOWERLINK_CN_ONOFF
= $(if
$(BR2_PACKAGE_OPENPOWERLINK_CN
),ON
,OFF
)
21 #### OPLK LIBRARY ####
23 # Always build a oplk stack
24 # Disable library with simulation interface
25 # Disable zynq/FPGA (PCIe) interface
26 OPENPOWERLINK_CONF_OPTS
+= -DCFG_OPLK_LIB
=ON \
27 -DCFG_COMPILE_LIB_MN_SIM
=OFF \
28 -DCFG_COMPILE_LIB_CN_SIM
=OFF \
29 -DCFG_COMPILE_LIB_MNAPP_ZYNQINTF
=OFF
31 # All option are ON by default
32 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB
),y
)
33 OPENPOWERLINK_DEPENDENCIES
+= libpcap
34 OPENPOWERLINK_CONF_OPTS
+= \
35 -DCFG_COMPILE_LIB_MN
=$(OPENPOWERLINK_MN_ONOFF
) \
36 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
37 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
38 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
39 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
40 -DCFG_COMPILE_LIB_CN
=$(OPENPOWERLINK_CN_ONOFF
) \
41 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
42 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
43 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
44 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
45 OPENPOWERLINK_DEPENDENCIES
+= libpcap
46 OPENPOWERLINK_CONF_OPTS
+= \
47 -DCFG_COMPILE_LIB_MN
=OFF \
48 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
49 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
50 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
51 -DCFG_COMPILE_LIB_MNDRV_PCAP
=$(OPENPOWERLINK_MN_ONOFF
) \
52 -DCFG_COMPILE_LIB_CN
=OFF \
53 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=$(OPENPOWERLINK_CN_ONOFF
) \
54 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
55 -DCFG_COMPILE_LIB_CNDRV_PCAP
=$(OPENPOWERLINK_CN_ONOFF
)
56 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
57 OPENPOWERLINK_CONF_OPTS
+= \
58 -DCFG_COMPILE_LIB_MN
=OFF \
59 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
60 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
61 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
62 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
63 -DCFG_COMPILE_LIB_CN
=OFF \
64 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
65 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=$(OPENPOWERLINK_CN_ONOFF
) \
66 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
67 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_PCIE_STACK_LIB
),y
)
68 OPENPOWERLINK_CONF_OPTS
+= \
69 -DCFG_COMPILE_LIB_MN
=OFF \
70 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
71 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
72 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
73 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
74 -DCFG_COMPILE_LIB_CN
=OFF \
75 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
76 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
77 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
80 OPENPOWERLINK_CONF_OPTS
+= \
81 -DCFG_COMPILE_SHARED_LIBRARY
=$(if
$(BR2_STATIC_LIBS
),OFF
,ON
)
83 #### OPLK KERNEL DRIVERS ####
85 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
)$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_PCIE_DRIVER
),y
)
86 OPENPOWERLINK_DEPENDENCIES
+= linux
88 OPENPOWERLINK_CONF_OPTS
+= \
89 -DCFG_KERNEL_DIR
="$(LINUX_DIR)" \
90 -DCMAKE_SYSTEM_VERSION
="$(LINUX_VERSION)" \
91 -DCFG_OPLK_MN
="$(OPENPOWERLINK_MN_ONOFF)" \
92 -DMAKE_KERNEL_ARCH
="$(KERNEL_ARCH)" \
93 -DMAKE_KERNEL_CROSS_COMPILE
="$(CCACHE) $(TARGET_CROSS)"
96 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
97 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_DRIVERS
=ON \
98 -DCFG_POWERLINK_EDRV_82573
=$(if
$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_82573
),ON
,OFF
) \
99 -DCFG_POWERLINK_EDRV_8255X
=$(if
$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_8255x
),ON
,OFF
) \
100 -DCFG_POWERLINK_EDRV_I210
=$(if
$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_I210
),ON
,OFF
) \
101 -DCFG_POWERLINK_EDRV_8111
=$(if
$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8111
),ON
,OFF
) \
102 -DCFG_POWERLINK_EDRV_8139
=$(if
$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8139
),ON
,OFF
)
104 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_DRIVERS
=OFF
107 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_PCIE_DRIVER
),y
)
108 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_PCIE_DRIVERS
=ON
110 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_PCIE_DRIVERS
=OFF
113 #### OPLK PCAP DAEMON ####
115 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
116 OPENPOWERLINK_CONF_OPTS
+= \
117 -DCFG_PCAP_DAEMON
=ON \
118 -DCFG_OPLK_MN
=$(OPENPOWERLINK_MN_ONOFF
)
121 #### OPLK DEMO APPS ####
123 # See apps/common/cmake/configure-linux.cmake for available options list.
124 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB
),y
)
125 OPENPOWERLINK_CONF_OPTS
+= \
126 -DCFG_BUILD_KERNEL_STACK
="Link to Application"
127 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
128 OPENPOWERLINK_CONF_OPTS
+= \
129 -DCFG_BUILD_KERNEL_STACK
="Linux Userspace Daemon"
130 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
131 OPENPOWERLINK_CONF_OPTS
+= \
132 -DCFG_BUILD_KERNEL_STACK
="Linux Kernel Module"
133 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_PCIE_STACK_LIB
),y
)
134 OPENPOWERLINK_CONF_OPTS
+= \
135 -DCFG_BUILD_KERNEL_STACK
="Kernel stack on PCIe card"
138 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
),y
)
139 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_MN_CONSOLE
=ON \
140 -DCFG_DEMO_MN_CONSOLE_USE_SYNCTHREAD
=ON
142 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_MN_CONSOLE
=OFF
145 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
),y
)
146 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_CN_CONSOLE
=ON
148 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_CN_CONSOLE
=OFF
151 $(eval
$(cmake-package
))