e32ad7f4253c031d1eecfaa9ea51dbcfa29db662
[openwrt/svn-archive/archive.git] / libs / libnotimpl / Makefile
1 #
2 # Copyright (C) 2006 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:=libnotimpl
12 PKG_VERSION:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/libnotimpl
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/libnotimpl
19 SECTION:=libs
20 CATEGORY:=Libraries
21 TITLE:=Implements functions missing from uClibc
22 endef
23
24 ifeq ($(ARCH),x86_64)
25 FPIC:=-fPIC
26 endif
27
28 define cc
29 $(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -Wall -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o
30 endef
31
32 define Build/Prepare
33 rm -rf $(PKG_BUILD_DIR)
34 mkdir -p $(PKG_BUILD_DIR)
35 endef
36
37 TARGET_CFLAGS += $(FPIC)
38
39 define Build/Compile
40 $(call cc,math)
41 $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o
42 endef
43
44 define Build/InstallDev
45 mkdir -p $(STAGING_DIR)/usr/lib
46 $(CP) $(PKG_BUILD_DIR)/libnotimpl.a $(STAGING_DIR)/usr/lib/
47 endef
48
49 $(eval $(call BuildPackage,libnotimpl))