3f714cd6821947912627e06c8d9b06c863fa7ef4
2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 HOST_BUILD_DIR ?
= $(BUILD_DIR_HOST
)/$(PKG_NAME
)$(if
$(PKG_VERSION
),-$(PKG_VERSION
))
9 PKG_INSTALL_DIR ?
= $(HOST_BUILD_DIR
)/host-install
11 include $(INCLUDE_DIR
)/host.mk
12 include $(INCLUDE_DIR
)/unpack.mk
13 include $(INCLUDE_DIR
)/depends.mk
15 HOST_STAMP_PREPARED
=$(HOST_BUILD_DIR
)/.prepared
$(if
$(QUILT
)$(DUMP
),,$(shell $(call find_md5
,${CURDIR} $(PKG_FILE_DEPEND
),)))
16 HOST_STAMP_CONFIGURED
:=$(HOST_BUILD_DIR
)/.configured
17 HOST_STAMP_BUILT
:=$(HOST_BUILD_DIR
)/.built
18 HOST_STAMP_INSTALLED
:=$(STAGING_DIR_HOST
)/stamp
/.
$(PKG_NAME
)_installed
22 include $(INCLUDE_DIR
)/download.mk
23 include $(INCLUDE_DIR
)/quilt.mk
25 Host
/Patch
:=$(Host
/Patch
/Default
)
26 ifneq ($(strip $(HOST_UNPACK
)),)
27 define Host
/Prepare
/Default
34 $(call Host
/Prepare
/Default
)
37 define Host
/Configure
/Default
38 @
(cd
$(HOST_BUILD_DIR
)/$(3); \
40 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(HOST_BUILD_DIR
)/$(3)/ && \
42 CPPFLAGS
="$(HOST_CFLAGS)" \
43 LDFLAGS
="$(HOST_LDFLAGS)" \
46 --target
=$(GNU_HOST_NAME
) \
47 --host
=$(GNU_HOST_NAME
) \
48 --build
=$(GNU_HOST_NAME
) \
51 --prefix=$(STAGING_DIR_HOST
) \
52 --exec-prefix
=$(STAGING_DIR_HOST
) \
53 --sysconfdir
=$(STAGING_DIR_HOST
)/etc \
54 --localstatedir
=$(STAGING_DIR_HOST
)/var \
62 $(call Host
/Configure
/Default
)
65 define Host
/Compile
/Default
66 $(MAKE
) -C
$(HOST_BUILD_DIR
) $(1)
70 $(call Host
/Compile
/Default
)
73 ifneq ($(if
$(QUILT
),,$(CONFIG_AUTOREBUILD
)),)
74 define HostHost
/Autoclean
75 $(call rdep
,${CURDIR} $(PKG_FILE_DEPEND
),$(HOST_STAMP_PREPARED
))
76 $(if
$(if
$(Host
/Compile
),$(filter prepare
,$(MAKECMDGOALS
)),1),,$(call rdep
,$(HOST_BUILD_DIR
),$(HOST_STAMP_BUILT
)))
80 define Download
/default
82 URL
:=$(PKG_SOURCE_URL
)
83 PROTO
:=$(PKG_SOURCE_PROTO
)
84 SUBDIR
:=$(PKG_SOURCE_SUBDIR
)
85 VERSION
:=$(PKG_SOURCE_VERSION
)
90 $(if
$(QUILT
),$(Host
/Quilt
))
91 $(if
$(strip $(PKG_SOURCE_URL
)),$(call Download
,default
))
92 $(if
$(DUMP
),,$(call HostHost
/Autoclean
))
94 $(HOST_STAMP_PREPARED
):
95 @
-rm -rf
$(HOST_BUILD_DIR
)
96 @mkdir
-p
$(HOST_BUILD_DIR
)
100 $(HOST_STAMP_CONFIGURED
): $(HOST_STAMP_PREPARED
)
101 $(call Host
/Configure
)
104 $(HOST_STAMP_BUILT
): $(HOST_STAMP_CONFIGURED
)
108 $(HOST_STAMP_INSTALLED
): $(HOST_STAMP_BUILT
)
110 mkdir
-p
$$(shell dirname
$$@
)
114 install: $(HOST_STAMP_INSTALLED
)
119 $(call Host
/Uninstall
)
120 rm -f
$(HOST_STAMP_INSTALLED
) $(HOST_STAMP_BUILT
)
123 prepare
: $(HOST_STAMP_PREPARED
)
124 configure
: $(HOST_STAMP_CONFIGURED
)
125 compile
: $(HOST_STAMP_BUILT
)
129 rm -rf
$(HOST_BUILD_DIR
)
This page took 0.041214 seconds and 3 git commands to generate.