bluez-utils: sdpd is no longer a separate daemon.
[openwrt/svn-archive/archive.git] / skels / Makefile.template
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 # This Makefile is a skeleton
8 #
9 # $Id: $
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=
14 PKG_VERSION:=
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=
18 PKG_MD5SUM:=
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/package
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=package
29 URL:=
30 endef
31
32 define Package/package/description
33 endef
34
35 CONFIGURE_ARGS += \
36 --enable-static \
37 --enable-shared
38
39 # If you wish to link against uclibc++ consider using the
40 # following variables :
41 CONFIGURE_VARS += \
42 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
43 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
44 LDFLAGS="$$$$LDFLAGS" \
45 LIBS="-nodefaultlibs -luClibc++ -lm -lnotimpl" \
46
47 MAKE_FLAGS += \
48 CFLAGS="$(TARGET_CFLAGS)"
49
50
51 define Build/Compile
52 # pass CFLAGS again to override -O2 set by configure
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 CFLAGS="$(TARGET_CFLAGS)" \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all install
57 endef
58
59
60 define Build/InstallDev
61 mkdir -p $(1)/usr/include/
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
63 mkdir -p $(1)/usr/package
64 $(CP) $(PKG_INSTALL_DIR)/usr/package/package.{a,so*} $(1)/usr/package/
65 endef
66
67 define Build/UninstallDev
68 rm -rf $(1)/usr/include/package \
69 $(1)/usr/package/package.{a,so*}
70 endef
71
72 define Package/package/install
73 $(INSTALL_DIR) $(1)/usr/package
74 $(CP) $(PKG_INSTALL_DIR)/usr/package/package.so.* $(1)/usr/package/
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package
77 $(INSTALL_DIR) $(1)/etc/config/
78 $(INSTALL_CONF) $(1)/etc/config/package
79 endef
80
81 $(eval $(call BuildPackage,package))