Add ezxml (#4362), thanks Raphael
[openwrt/svn-archive/archive.git] / skels / Makefile.template
1 #
2 # Copyright (C) 2008 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 include $(INCLUDE_DIR)/package.mk
21
22 define Package/package
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=package
26 URL:=
27 endef
28
29 define Package/package/description
30 endef
31
32 CONFIGURE_ARGS += \
33 --enable-static \
34 --enable-shared
35
36 # If you wish to link against uclibc++ consider using the
37 # following variables :
38 CONFIGURE_VARS += \
39 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
40 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
41 LDFLAGS="$$$$LDFLAGS" \
42 LIBS="-nodefaultlibs -luClibc++ -lm -lnotimpl" \
43
44 MAKE_FLAGS += \
45 CFLAGS="$(TARGET_CFLAGS)"
46
47 define Build/Compile
48 # pass CFLAGS again to override -O2 set by configure
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 CFLAGS="$(TARGET_CFLAGS)" \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
59 mkdir -p $(1)/usr/package
60 $(CP) $(PKG_INSTALL_DIR)/usr/package/package.{a,so*} $(1)/usr/package/
61 endef
62
63 define Build/UninstallDev
64 rm -rf $(1)/usr/include/package \
65 $(1)/usr/package/package.{a,so*}
66 endef
67
68 define Package/package/install
69 $(INSTALL_DIR) $(1)/usr/package
70 $(CP) $(PKG_INSTALL_DIR)/usr/package/package.so.* $(1)/usr/package/
71 $(INSTALL_DIR) $(1)/etc/init.d
72 $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package
73 $(INSTALL_DIR) $(1)/etc/config/
74 $(INSTALL_CONF) $(1)/etc/config/package
75 endef
76
77 $(eval $(call BuildPackage,package))