a5e7ba2ff7a8baa8f964c6df83636ac74c45fbf6
[openwrt/svn-archive/archive.git] / libs / pthsem / Makefile
1
2 include $(TOPDIR)/rules.mk
3
4 PKG_NAME:=pthsem
5 PKG_VERSION:=2.0.8
6 PKG_RELEASE:=1
7
8 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
9 PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
10 PKG_MD5SUM:=9144b26dcc27e67498d63dd5456f934c
11
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_FIXUP:=libtool
14 PKG_BUILD_PARALLEL:=1
15 PKG_INSTALL:=1
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/pthsem
20 SECTION:=libs
21 CATEGORY:=Libraries
22 TITLE:=GNU pth extended with semaphore support
23 URL:=http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
24 DEPENDS:=@USE_EGLIBC @TARGET_x86
25 endef
26
27 define Package/pthsem/description
28 GNU pth is a user mode multi threading library.
29 pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
30 endef
31
32 MAKE_FLAGS += \
33 OPTIM="$(TARGET_CFLAGS)" \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 DESTDIR="$(PKG_INSTALL_DIR)"
36
37 define Build/InstallDev
38 $(INSTALL_DIR) $(2)/bin
39 $(INSTALL_BIN) \
40 $(PKG_INSTALL_DIR)/usr/bin/pthsem-config \
41 $(2)/bin/
42 $(SED) \
43 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
44 $(2)/bin/pthsem-config
45
46 $(INSTALL_DIR) $(1)/usr/include
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h \
48 $(1)/usr/include/
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.{a,la,so*} \
51 $(1)/usr/lib/
52 endef
53
54 define Package/pthsem/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,pthsem))