move firmware loading to hotplug2-init.rules (should fix #2056)
[openwrt.git] / include / package-defaults.mk
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 define Package/Default
9 CONFIGFILE:=
10 SECTION:=opt
11 CATEGORY:=Extra packages
12 DEPENDS:=
13 PROVIDES:=
14 EXTRA_DEPENDS:=
15 MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
16 SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
17 ifneq ($(PKG_VERSION),)
18 ifneq ($(PKG_RELEASE),)
19 VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
20 else
21 VERSION:=$(PKG_VERSION)
22 endif
23 else
24 VERSION:=$(PKG_RELEASE)
25 endif
26 PKGARCH:=$(ARCH)
27 PRIORITY:=optional
28 DEFAULT:=
29 MENU:=
30 SUBMENU:=
31 SUBMENUDEP:=
32 TITLE:=
33 DESCRIPTION:=
34 endef
35
36 Build/Patch:=$(Build/Patch/Default)
37 ifneq ($(strip $(PKG_UNPACK)),)
38 define Build/Prepare/Default
39 $(PKG_UNPACK)
40 $(Build/Patch)
41 endef
42 endif
43
44 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
45 TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
46
47 CONFIGURE_ARGS = \
48 --target=$(GNU_TARGET_NAME) \
49 --host=$(GNU_TARGET_NAME) \
50 --build=$(GNU_HOST_NAME) \
51 --program-prefix="" \
52 --program-suffix="" \
53 --prefix=/usr \
54 --exec-prefix=/usr \
55 --bindir=/usr/bin \
56 --sbindir=/usr/sbin \
57 --libexecdir=/usr/lib \
58 --sysconfdir=/etc \
59 --datadir=/usr/share \
60 --localstatedir=/var \
61 --mandir=/usr/man \
62 --infodir=/usr/info \
63 $(DISABLE_NLS)
64
65 CONFIGURE_VARS = \
66 $(TARGET_CONFIGURE_OPTS) \
67 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
68 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
69 CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
70 LDFLAGS="$(TARGET_LDFLAGS)" \
71 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
72 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
73
74 CONFIGURE_PATH = .
75 CONFIGURE_CMD = ./configure
76
77 define Build/Configure/Default
78 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \
79 if [ -x $(CONFIGURE_CMD) ]; then \
80 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/$(3)/ && \
81 $(CONFIGURE_VARS) \
82 $(2) \
83 $(CONFIGURE_CMD) \
84 $(CONFIGURE_ARGS) \
85 $(1); \
86 fi; \
87 )
88 endef
89
90 MAKE_VARS = \
91 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
92 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
93 LDFLAGS="$(EXTRA_LDFLAGS) "
94
95 MAKE_FLAGS = \
96 $(TARGET_CONFIGURE_OPTS) \
97 CROSS="$(TARGET_CROSS)" \
98 ARCH="$(ARCH)"
99
100 MAKE_PATH = .
101
102 define Build/Compile/Default
103 $(MAKE_VARS) \
104 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
105 $(MAKE_FLAGS) \
106 $(1);
107 endef
108
109
This page took 0.041577 seconds and 5 git commands to generate.