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