2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
11 PKG_NAME:=libatomicops
15 PKG_SOURCE:=libatomic_ops-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.hpl.hp.com/research/linux/atomic_ops/download/
17 PKG_MD5SUM:=1b65e48271c81e3fa2d7a9a69bab7504
19 PKG_BUILD_DIR:=$(BUILD_DIR)/libatomic_ops-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22 include $(INCLUDE_DIR)/package.mk
24 define Package/libatomicops
27 TITLE:=implementations for atomic memory update operations
28 URL:=http://www.hpl.hp.com/research/linux/atomic_ops/
31 define Package/libatomicops/description
32 Provides implementations for atomic memory update
33 operations on a number of architectures. This allows
34 direct use of these in reasonably portable code. Unlike
35 earlier similar packages, this one explicitly considers
36 memory barrier semantics, and allows the construction of
37 code that involves minimum overhead across a variety of
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
51 define Build/InstallDev
52 mkdir -p $(1)/usr/include/
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatomic_ops*.a $(1)/usr/lib/
58 define Build/UninstallDev
60 $(STAGING_DIR)/usr/include/atomic_ops{,_malloc,_stack}.h \
61 $(STAGING_DIR)/usr/include/atomic_ops \
62 $(STAGING_DIR)/usr/lib/libatomic_ops{,_gpl}.a
65 $(eval $(call BuildPackage,libatomicops))