pthsem: Update. This fixes parallel build.
[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 endef
25
26 define Package/pthsem/description
27 GNU pth is a user mode multi threading library.
28 pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
29 endef
30
31 MAKE_FLAGS += \
32 OPTIM="$(TARGET_CFLAGS)" \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 DESTDIR="$(PKG_INSTALL_DIR)"
35
36 define Build/InstallDev
37 $(INSTALL_DIR) $(2)/bin
38 $(INSTALL_BIN) \
39 $(PKG_INSTALL_DIR)/usr/bin/pthsem-config \
40 $(2)/bin/
41 $(SED) \
42 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
43 $(2)/bin/pthsem-config
44
45 $(INSTALL_DIR) $(1)/usr/include
46 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h \
47 $(1)/usr/include/
48 $(INSTALL_DIR) $(1)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.{a,la,so*} \
50 $(1)/usr/lib/
51 endef
52
53 define Package/pthsem/install
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
56 endef
57
58 $(eval $(call BuildPackage,pthsem))