2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(INCLUDE_DIR
)/host.mk
9 include $(INCLUDE_DIR
)/unpack.mk
11 ifneq ($(strip $(PKG_UNPACK
)),)
12 define Build
/Prepare
/Default
14 @if
[ -d .
/patches
]; then \
15 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
; \
21 $(call Build
/Prepare
/Default
)
24 define Build
/Configure
/Default
25 @
(cd
$(PKG_BUILD_DIR
)/$(3); \
28 CPPFLAGS
="-I$(STAGING_DIR)/host/include" \
29 LDFLAGS
="-L$(STAGING_DIR)/host/lib" \
31 --target
=$(GNU_TARGET_NAME
) \
32 --host
=$(GNU_TARGET_NAME
) \
33 --build
=$(GNU_HOST_NAME
) \
40 --libexecdir
=/usr
/lib \
42 --datadir=/usr
/share \
43 --localstatedir
=/var \
52 define Build
/Configure
53 $(call Build
/Configure
/Default
)
56 define Build
/Compile
/Default
57 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(1)
61 $(call Build
/Compile
/Default
)
65 ifneq ($(strip $(PKG_SOURCE
)),)
66 download
: $(DL_DIR
)/$(PKG_SOURCE
)
68 $(DL_DIR
)/$(PKG_SOURCE
):
70 $(SCRIPT_DIR
)/download.pl
"$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL
)
72 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
76 $(PKG_BUILD_DIR
)/.prepared
:
77 @
-rm -rf
$(PKG_BUILD_DIR
)
78 @mkdir
-p
$(PKG_BUILD_DIR
)
82 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
83 $(call Build
/Configure
)
86 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
90 $(STAGING_DIR
)/stampfiles
/.host_
$(PKG_NAME
)-installed
: $(PKG_BUILD_DIR
)/.built
95 install-targets
: $(STAGING_DIR
)/stampfiles
/.host_
$(PKG_NAME
)-installed
100 $(call Build
/Uninstall
)
101 rm -f
$(STAGING_DIR
)/stampfiles
/.host_
$(PKG_NAME
)-installed
104 prepare
: $(PKG_BUILD_DIR
)/.prepared
105 configure
: $(PKG_BUILD_DIR
)/.configured
107 compile-targets
: $(PKG_BUILD_DIR
)/.built
108 compile
: compile-targets
111 install: install-targets
115 @
$(MAKE
) clean-targets
117 rm -rf
$(PKG_BUILD_DIR
)
This page took 0.056335 seconds and 5 git commands to generate.