libatomic_ops does not have support for avr32 yet
[openwrt/svn-archive/archive.git] / libs / libatomicops / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libatomicops
12 PKG_VERSION:=1.2
13 PKG_RELEASE:=1
14
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
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/libatomic_ops-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libatomicops
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=implementations for atomic memory update operations
28 DEPENDS:=@!TARGET_avr32
29 URL:=http://www.hpl.hp.com/research/linux/atomic_ops/
30 endef
31
32 define Package/libatomicops/description
33 Provides implementations for atomic memory update
34 operations on a number of architectures. This allows
35 direct use of these in reasonably portable code. Unlike
36 earlier similar packages, this one explicitly considers
37 memory barrier semantics, and allows the construction of
38 code that involves minimum overhead across a variety of
39 architectures.
40 endef
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(1)/usr/include/
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
55 $(CP) $(PKG_BUILD_DIR)/src/atomic_ops $(1)/usr/include/
56 mkdir -p $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatomic_ops*.a $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libatomicops))