1 ################################################################################
5 ################################################################################
7 OPENPOWERLINK_VERSION
= V2.4
.1
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 OPENPOWERLINK_CONF_OPTS
+= -DCFG_OPLK_LIB
=ON
26 # All option are ON by default
27 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB
),y
)
28 OPENPOWERLINK_DEPENDENCIES
+= libpcap
29 OPENPOWERLINK_CONF_OPTS
+= \
30 -DCFG_COMPILE_LIB_MN
=$(OPENPOWERLINK_MN_ONOFF
) \
31 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
32 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
33 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
34 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
35 -DCFG_COMPILE_LIB_CN
=$(OPENPOWERLINK_CN_ONOFF
) \
36 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
37 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
38 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
39 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
40 OPENPOWERLINK_DEPENDENCIES
+= libpcap
41 OPENPOWERLINK_CONF_OPTS
+= \
42 -DCFG_COMPILE_LIB_MN
=OFF \
43 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
44 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
45 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
46 -DCFG_COMPILE_LIB_MNDRV_PCAP
=$(OPENPOWERLINK_MN_ONOFF
) \
47 -DCFG_COMPILE_LIB_CN
=OFF \
48 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=$(OPENPOWERLINK_CN_ONOFF
) \
49 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
50 -DCFG_COMPILE_LIB_CNDRV_PCAP
=$(OPENPOWERLINK_CN_ONOFF
)
51 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
52 OPENPOWERLINK_CONF_OPTS
+= \
53 -DCFG_COMPILE_LIB_MN
=OFF \
54 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
55 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
56 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=OFF \
57 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
58 -DCFG_COMPILE_LIB_CN
=OFF \
59 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
60 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=$(OPENPOWERLINK_CN_ONOFF
) \
61 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
62 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_PCIE_STACK_LIB
),y
)
63 OPENPOWERLINK_CONF_OPTS
+= \
64 -DCFG_COMPILE_LIB_MN
=OFF \
65 -DCFG_COMPILE_LIB_MNAPP_USERINTF
=OFF \
66 -DCFG_COMPILE_LIB_MNAPP_KERNELINTF
=OFF \
67 -DCFG_COMPILE_LIB_MNAPP_PCIEINTF
=$(OPENPOWERLINK_MN_ONOFF
) \
68 -DCFG_COMPILE_LIB_MNDRV_PCAP
=OFF \
69 -DCFG_COMPILE_LIB_CN
=OFF \
70 -DCFG_COMPILE_LIB_CNAPP_USERINTF
=OFF \
71 -DCFG_COMPILE_LIB_CNAPP_KERNELINTF
=OFF \
72 -DCFG_COMPILE_LIB_CNDRV_PCAP
=OFF
75 OPENPOWERLINK_CONF_OPTS
+= \
76 -DCFG_COMPILE_SHARED_LIBRARY
=$(if
$(BR2_STATIC_LIBS
),OFF
,ON
)
78 #### OPLK KERNEL DRIVERS ####
80 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
)$(BR2_PACKAGE_OPENPOWERLINK_KERNEL_PCIE_DRIVER
),y
)
81 OPENPOWERLINK_DEPENDENCIES
+= linux
83 OPENPOWERLINK_CONF_OPTS
+= \
84 -DCFG_KERNEL_DIR
="$(LINUX_DIR)" \
85 -DCMAKE_SYSTEM_VERSION
="$(LINUX_VERSION)" \
86 -DCFG_OPLK_MN
="$(OPENPOWERLINK_MN_ONOFF)" \
87 -DMAKE_KERNEL_ARCH
="$(KERNEL_ARCH)" \
88 -DMAKE_KERNEL_CROSS_COMPILE
="$(CCACHE) $(TARGET_CROSS)"
91 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
92 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_DRIVERS
=ON
93 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_82573
),y
)
94 OPENPOWERLINK_CONF_OPTS
+= -DCFG_POWERLINK_EDRV
=82573
95 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_8255x
),y
)
96 OPENPOWERLINK_CONF_OPTS
+= -DCFG_POWERLINK_EDRV
=8255x
97 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_I210
),y
)
98 OPENPOWERLINK_CONF_OPTS
+= -DCFG_POWERLINK_EDRV
=i210
99 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8111
),y
)
100 OPENPOWERLINK_CONF_OPTS
+= -DCFG_POWERLINK_EDRV
=8111
101 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8139
),y
)
102 OPENPOWERLINK_CONF_OPTS
+= -DCFG_POWERLINK_EDRV
=8139
105 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_DRIVERS
=OFF
108 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_PCIE_DRIVER
),y
)
109 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_PCIE_DRIVERS
=ON
111 OPENPOWERLINK_CONF_OPTS
+= -DCFG_KERNEL_PCIE_DRIVERS
=OFF
114 #### OPLK PCAP DAEMON ####
116 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
117 OPENPOWERLINK_CONF_OPTS
+= \
118 -DCFG_PCAP_DAEMON
=ON \
119 -DCFG_OPLK_MN
=$(OPENPOWERLINK_MN_ONOFF
)
122 #### OPLK DEMO APPS ####
124 # See apps/common/cmake/configure-linux.cmake for available options list.
125 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB
),y
)
126 OPENPOWERLINK_CONF_OPTS
+= \
127 -DCFG_BUILD_KERNEL_STACK
="Link to Application"
128 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
),y
)
129 OPENPOWERLINK_CONF_OPTS
+= \
130 -DCFG_BUILD_KERNEL_STACK
="Linux Userspace Daemon"
131 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
),y
)
132 OPENPOWERLINK_CONF_OPTS
+= \
133 -DCFG_BUILD_KERNEL_STACK
="Linux Kernel Module"
134 else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_PCIE_STACK_LIB
),y
)
135 OPENPOWERLINK_CONF_OPTS
+= \
136 -DCFG_BUILD_KERNEL_STACK
="Kernel stack on PCIe card"
139 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
),y
)
140 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_MN_CONSOLE
=ON \
141 -DCFG_DEMO_MN_CONSOLE_USE_SYNCTHREAD
=ON
143 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_MN_CONSOLE
=OFF
146 ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
),y
)
147 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_CN_CONSOLE
=ON
149 OPENPOWERLINK_CONF_OPTS
+= -DCFG_DEMO_CN_CONSOLE
=OFF
152 $(eval
$(cmake-package
))