From 8731a5716b8dceabb4952949106278b449fdd60f Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Wed, 1 Nov 2017 01:13:13 +1100 Subject: [PATCH] add package libatomic_ops See #1539 --- src/libatomic_ops.mk | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/libatomic_ops.mk diff --git a/src/libatomic_ops.mk b/src/libatomic_ops.mk new file mode 100644 index 00000000..de109fea --- /dev/null +++ b/src/libatomic_ops.mk @@ -0,0 +1,35 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libatomic_ops +$(PKG)_WEBSITE := https://github.com/ivmai/libatomic_ops +$(PKG)_DESCR := The atomic_ops project (Atomic memory update operations portable implementation) +$(PKG)_IGNORE := 7.6% +$(PKG)_VERSION := 7.4.8 +$(PKG)_CHECKSUM := b985816abc69df5781d6d9fcf081e03a3a1e44032030d0a2c28f8de731e7f20f +$(PKG)_GH_CONF := ivmai/libatomic_ops,v +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + # build and install the library + cd '$(SOURCE_DIR)' && autoreconf -fi + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config file + # the *_gpl lib has extra functions needed for test program + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: atomic_ops_gpl'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: $($(PKG)_DESCR)'; \ + echo 'Requires: atomic_ops'; \ + echo 'Libs: -latomic_ops_gpl';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/atomic_ops_gpl.pc' + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -pedantic \ + '$(SOURCE_DIR)/tests/test_stack.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' atomic_ops_gpl --cflags --libs` +endef