4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 2021, Jim Klimov
23 # Copyright (c) 2022, Niklas Poslovski
26 USE_DEFAULT_TEST_TRANSFORMS
= yes
27 include ..
/..
/..
/make-rules
/shared-macros.mk
29 COMPONENT_NAME
= libmodbus
30 COMPONENT_VERSION
= 3.1.10
31 COMPONENT_SUMMARY
= Cross-platform library to send
/receive data according to the Modbus protocol with RTU
(serial
) and TCP
(Ethernet
) communications
32 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
33 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
34 COMPONENT_ARCHIVE_HASH
= sha256
:899be4e25ab7fe5799d43f9567510d6f063d2e8f56136dd726b6fd976f9b2253
35 COMPONENT_ARCHIVE_URL
= https
://github.com
/stephane
/libmodbus
/releases
/download
/v
$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
36 COMPONENT_PROJECT_URL
= https
://libmodbus.org
/
37 COMPONENT_FMRI
= library
/$(COMPONENT_NAME
)
38 COMPONENT_CLASSIFICATION
=System
/Libraries
39 COMPONENT_LICENSE
= LGPLv2.1
+
40 COMPONENT_LICENSE_FILE
= COPYING.LESSER
42 include $(WS_MAKE_RULES
)/common.mk
44 # Find issues with undefined symbols in build time
45 LD_OPTIONS
+= $(LD_Z_DEFS
)
47 COMPONENT_PREP_ACTION
= ( cd
$(@D
); $(AUTORECONF
) -if
)
49 CONFIGURE_OPTIONS
+= --enable-static
=no
51 COMPONENT_BUILD_ARGS
+= "LDFLAGS=$(LDFLAGS) -lsocket"
52 COMPONENT_BUILD_ARGS
+= "INSTALL=$(INSTALL)"
53 COMPONENT_BUILD_ARGS
+= "MAKE=$(GMAKE)"
55 # This is needed to make the tests successful:
58 # Auto-generated dependencies
59 REQUIRED_PACKAGES
+= system
/library