2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-04-19 23:14:13 +00:00
|
|
|
ifneq ($(DUMP),)
|
2006-05-11 22:36:20 +00:00
|
|
|
all: dumpinfo
|
2006-04-19 23:14:13 +00:00
|
|
|
else
|
2006-05-11 22:36:20 +00:00
|
|
|
all: compile
|
2006-04-20 03:53:28 +00:00
|
|
|
endif
|
2006-04-14 03:03:32 +00:00
|
|
|
|
2006-07-29 11:30:06 +00:00
|
|
|
include $(INCLUDE_DIR)/prereq.mk
|
2006-10-10 21:22:35 +00:00
|
|
|
include $(INCLUDE_DIR)/host.mk
|
2006-10-14 00:40:27 +00:00
|
|
|
include $(INCLUDE_DIR)/unpack.mk
|
2006-07-29 11:30:06 +00:00
|
|
|
|
2006-10-19 15:25:58 +00:00
|
|
|
export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
|
|
|
|
|
2006-04-14 03:03:32 +00:00
|
|
|
define Build/DefaultTargets
|
2006-05-15 20:30:26 +00:00
|
|
|
ifeq ($(DUMP),)
|
2006-07-26 01:01:09 +00:00
|
|
|
ifeq ($(CONFIG_AUTOREBUILD),y)
|
2007-01-12 11:09:05 +00:00
|
|
|
ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(PKG_FILE_DEPEND)),$(PKG_BUILD_DIR))
|
2007-01-20 01:35:13 +00:00
|
|
|
$$(info Forcing package rebuild)
|
2006-06-02 16:17:56 +00:00
|
|
|
$(PKG_BUILD_DIR)/.prepared: package-clean
|
|
|
|
endif
|
2006-06-04 14:40:47 +00:00
|
|
|
endif
|
2006-05-14 09:30:29 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-20 23:40:02 +00:00
|
|
|
$(PKG_BUILD_DIR)/.prepared:
|
2006-05-11 00:18:12 +00:00
|
|
|
@-rm -rf $(PKG_BUILD_DIR)
|
|
|
|
@mkdir -p $(PKG_BUILD_DIR)
|
2006-04-14 03:03:32 +00:00
|
|
|
$(call Build/Prepare)
|
2006-05-11 23:14:04 +00:00
|
|
|
touch $$@
|
2006-04-14 03:03:32 +00:00
|
|
|
|
2006-05-11 23:14:04 +00:00
|
|
|
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
2006-04-14 03:03:32 +00:00
|
|
|
$(call Build/Configure)
|
|
|
|
touch $$@
|
|
|
|
|
2006-05-14 09:30:29 +00:00
|
|
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
|
2006-04-14 03:03:32 +00:00
|
|
|
$(call Build/Compile)
|
2006-05-14 09:30:29 +00:00
|
|
|
touch $$@
|
2006-05-31 16:20:27 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifdef Build/InstallDev
|
2006-09-07 12:48:22 +00:00
|
|
|
ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed $(PKG_BUILD_DIR)),$(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed)
|
|
|
|
$(PKG_BUILD_DIR)/.built: package-rebuild
|
|
|
|
endif
|
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
$(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built
|
2006-07-18 20:17:05 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/stampfiles
|
2006-05-24 07:12:59 +00:00
|
|
|
$(call Build/InstallDev)
|
|
|
|
touch $$@
|
2006-06-01 00:06:16 +00:00
|
|
|
|
2006-06-02 16:12:05 +00:00
|
|
|
compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
|
2006-06-01 00:06:16 +00:00
|
|
|
endif
|
2006-05-31 16:20:27 +00:00
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
package-clean: FORCE
|
2006-04-20 03:45:03 +00:00
|
|
|
$(call Build/Clean)
|
2006-05-24 07:12:59 +00:00
|
|
|
$(call Build/UninstallDev)
|
2006-08-02 12:07:14 +00:00
|
|
|
-rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
|
2006-04-20 03:45:03 +00:00
|
|
|
|
2006-05-14 09:30:29 +00:00
|
|
|
package-rebuild: FORCE
|
2006-06-16 21:39:42 +00:00
|
|
|
@-rm -f $(PKG_BUILD_DIR)/.built
|
2006-05-14 09:30:29 +00:00
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
define Build/DefaultTargets
|
|
|
|
endef
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
2005-07-24 19:58:14 +00:00
|
|
|
|
2006-04-19 23:56:04 +00:00
|
|
|
define Package/Default
|
2006-05-11 22:36:20 +00:00
|
|
|
CONFIGFILE:=
|
|
|
|
SECTION:=opt
|
|
|
|
CATEGORY:=Extra packages
|
|
|
|
DEPENDS:=
|
2006-10-17 19:01:08 +00:00
|
|
|
PROVIDES:=
|
2006-07-18 15:31:01 +00:00
|
|
|
EXTRA_DEPENDS:=
|
2006-05-11 22:36:20 +00:00
|
|
|
MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
|
|
|
SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
|
2006-06-02 00:01:00 +00:00
|
|
|
ifneq ($(PKG_VERSION),)
|
|
|
|
ifneq ($(PKG_RELEASE),)
|
|
|
|
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
|
|
|
else
|
|
|
|
VERSION:=$(PKG_VERSION)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
VERSION:=$(PKG_RELEASE)
|
|
|
|
endif
|
2006-05-11 22:36:20 +00:00
|
|
|
PKGARCH:=$(ARCH)
|
|
|
|
PRIORITY:=optional
|
|
|
|
DEFAULT:=
|
|
|
|
MENU:=
|
2006-06-25 16:05:43 +00:00
|
|
|
SUBMENU:=
|
2006-07-21 14:27:45 +00:00
|
|
|
SUBMENUDEP:=
|
2006-05-11 22:36:20 +00:00
|
|
|
TITLE:=
|
|
|
|
DESCRIPTION:=
|
2006-05-11 00:18:12 +00:00
|
|
|
endef
|
|
|
|
|
2006-09-24 21:17:17 +00:00
|
|
|
define BuildDescription
|
|
|
|
ifneq ($(DESCRIPTION),)
|
|
|
|
DESCRIPTION:=$(TITLE)\\ $(DESCRIPTION)
|
|
|
|
else
|
|
|
|
DESCRIPTION:=$(TITLE)
|
|
|
|
endif
|
|
|
|
endef
|
|
|
|
|
2006-06-18 13:09:32 +00:00
|
|
|
define BuildIPKGVariable
|
2006-10-10 15:30:50 +00:00
|
|
|
$(call shexport,Package/$(1)/$(2))
|
|
|
|
$(1)_COMMANDS += var2file "$(call shvar,Package/$(1)/$(2))" $(2);
|
2006-06-18 13:09:32 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-19 23:56:04 +00:00
|
|
|
define BuildPackage
|
2006-05-11 22:36:20 +00:00
|
|
|
$(eval $(call Package/Default))
|
|
|
|
$(eval $(call Package/$(1)))
|
2006-09-24 21:17:17 +00:00
|
|
|
$(eval $(call BuildDescription))
|
2006-04-14 01:22:55 +00:00
|
|
|
|
2006-09-24 21:17:17 +00:00
|
|
|
$(foreach FIELD, TITLE CATEGORY PRIORITY SECTION VERSION,
|
2006-05-11 22:36:20 +00:00
|
|
|
ifeq ($($(FIELD)),)
|
|
|
|
$$(error Package/$(1) is missing the $(FIELD) field)
|
|
|
|
endif
|
|
|
|
)
|
2006-05-11 00:18:12 +00:00
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
|
|
|
|
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1)
|
|
|
|
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
|
2005-05-09 09:33:23 +00:00
|
|
|
|
2006-07-18 15:31:01 +00:00
|
|
|
ifdef Package/$(1)/install
|
|
|
|
ifeq ($(CONFIG_PACKAGE_$(1)),y)
|
|
|
|
install-targets: $$(INFO_$(1))
|
|
|
|
endif
|
2005-05-09 09:33:23 +00:00
|
|
|
|
2006-11-30 21:39:37 +00:00
|
|
|
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER)$(SDK),)
|
2006-07-18 15:31:01 +00:00
|
|
|
compile-targets: $$(IPKG_$(1))
|
2006-08-30 09:57:57 +00:00
|
|
|
else
|
|
|
|
compile-targets: $(1)-disabled
|
|
|
|
$(1)-disabled:
|
|
|
|
@echo "WARNING: skipping $(1) -- package not selected"
|
2006-07-18 15:31:01 +00:00
|
|
|
endif
|
2006-05-11 22:36:20 +00:00
|
|
|
endif
|
2006-04-20 03:45:03 +00:00
|
|
|
|
2006-07-10 21:17:45 +00:00
|
|
|
ifeq ($(FORCEREBUILD),y)
|
|
|
|
$$(IPKG_$(1)): FORCE
|
|
|
|
endif
|
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
IDEPEND_$(1):=$$(strip $$(DEPENDS))
|
2006-04-20 00:03:19 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifneq ($(DUMP),)
|
2006-11-27 03:33:19 +00:00
|
|
|
dumpinfo: dumpinfo-$(1)
|
|
|
|
dumpinfo-$(1): FORCE
|
|
|
|
@$$(DUMPINFO_$(call shvar,$(1)))
|
|
|
|
|
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-04-21 00:12:18 +00:00
|
|
|
echo "Package: $(1)";
|
2006-05-11 22:36:20 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifneq ($(MENU),)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-04-21 00:12:18 +00:00
|
|
|
echo "Menu: $(MENU)";
|
2006-08-02 12:07:14 +00:00
|
|
|
endif
|
2006-05-11 22:36:20 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifneq ($(SUBMENU),)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-08-02 12:07:14 +00:00
|
|
|
echo "Submenu: $(SUBMENU)";
|
|
|
|
ifneq ($(SUBMENUDEP),)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-07-21 14:27:45 +00:00
|
|
|
echo "Submenu-Depends: $(SUBMENUDEP)";
|
2006-08-02 12:07:14 +00:00
|
|
|
endif
|
2006-07-21 14:27:45 +00:00
|
|
|
endif
|
2006-06-25 16:05:43 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifneq ($(DEFAULT),)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-04-21 00:12:18 +00:00
|
|
|
echo "Default: $(DEFAULT)";
|
2006-08-02 12:07:14 +00:00
|
|
|
endif
|
2006-05-11 22:36:20 +00:00
|
|
|
|
2006-10-10 15:45:36 +00:00
|
|
|
$(call shexport,Package/$(1)/description)
|
|
|
|
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-10-05 12:39:52 +00:00
|
|
|
if [ "$$$$PREREQ_CHECK" = 1 ]; then echo "Prereq-Check: 1"; fi; \
|
2006-04-20 00:03:19 +00:00
|
|
|
echo "Version: $(VERSION)"; \
|
2006-04-21 00:12:18 +00:00
|
|
|
echo "Depends: $$(IDEPEND_$(1))"; \
|
2006-10-17 19:01:08 +00:00
|
|
|
echo "Provides: $(PROVIDES)"; \
|
2007-01-22 17:33:10 +00:00
|
|
|
echo "Build-Depends: $(PKG_BUILD_DEPENDS)"; \
|
2007-01-14 12:21:39 +00:00
|
|
|
echo "Section: $(SECTION)"; \
|
2006-04-21 00:12:18 +00:00
|
|
|
echo "Category: $(CATEGORY)"; \
|
2006-04-20 00:03:19 +00:00
|
|
|
echo "Title: $(TITLE)"; \
|
2007-01-13 14:09:48 +00:00
|
|
|
echo "Maintainer: $(MAINTAINER)"; \
|
2006-10-10 15:45:36 +00:00
|
|
|
if isset $(call shvar,Package/$(1)/description); then \
|
|
|
|
echo -n "Description: "; \
|
|
|
|
getvar $(call shvar,Package/$(1)/description); \
|
|
|
|
else \
|
2006-11-27 03:33:19 +00:00
|
|
|
echo "Description: $(patsubst \\,\\\\,$(DESCRIPTION))" | perl -ne 's/\\/\n/g, print'; \
|
2006-10-10 15:45:36 +00:00
|
|
|
fi;
|
2006-10-05 12:39:52 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
ifneq ($(URL),)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-10-10 15:30:50 +00:00
|
|
|
echo; \
|
|
|
|
echo "$(URL)";
|
2006-08-02 12:07:14 +00:00
|
|
|
endif
|
2006-10-10 15:30:50 +00:00
|
|
|
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
2006-10-10 15:30:50 +00:00
|
|
|
echo "@@";
|
|
|
|
|
|
|
|
$(call shexport,Package/$(1)/config)
|
2006-11-27 03:33:19 +00:00
|
|
|
DUMPINFO_$(call shvar,$(1)) += \
|
|
|
|
if isset $(call shvar,Package/$(1)/config); then \
|
|
|
|
echo "Config: "; \
|
|
|
|
getvar $(call shvar,Package/$(1)/config); \
|
|
|
|
echo "@@"; \
|
|
|
|
fi;
|
2006-10-10 15:30:50 +00:00
|
|
|
|
2006-05-19 22:46:24 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-18 13:09:32 +00:00
|
|
|
$(eval $(call BuildIPKGVariable,$(1),conffiles))
|
|
|
|
$(eval $(call BuildIPKGVariable,$(1),preinst))
|
|
|
|
$(eval $(call BuildIPKGVariable,$(1),postinst))
|
|
|
|
$(eval $(call BuildIPKGVariable,$(1),prerm))
|
|
|
|
$(eval $(call BuildIPKGVariable,$(1),postrm))
|
2006-08-02 12:07:14 +00:00
|
|
|
$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH)
|
2007-02-16 01:00:01 +00:00
|
|
|
@rm -f $(PACKAGE_DIR)/$(1)_*
|
2006-04-14 01:22:55 +00:00
|
|
|
mkdir -p $$(IDIR_$(1))/CONTROL
|
2006-04-20 00:03:19 +00:00
|
|
|
echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
|
|
|
|
echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
|
2006-05-30 18:55:52 +00:00
|
|
|
( \
|
2006-11-25 19:45:22 +00:00
|
|
|
DEPENDS='$(EXTRA_DEPENDS)'; \
|
2006-05-31 16:01:46 +00:00
|
|
|
for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \
|
2006-05-30 18:55:52 +00:00
|
|
|
DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \
|
|
|
|
done; \
|
2006-11-25 19:45:22 +00:00
|
|
|
echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \
|
2006-05-30 18:55:52 +00:00
|
|
|
)
|
2006-04-20 00:03:19 +00:00
|
|
|
echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
|
|
|
|
echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
|
|
|
|
echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
|
|
|
|
echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control
|
|
|
|
echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control
|
2006-09-24 21:17:17 +00:00
|
|
|
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g' | sed -e 's,^[[:space:]]*$$$$, .,g' >> $$(IDIR_$(1))/CONTROL/control
|
2006-04-14 01:22:55 +00:00
|
|
|
chmod 644 $$(IDIR_$(1))/CONTROL/control
|
2006-06-18 13:09:32 +00:00
|
|
|
(cd $$(IDIR_$(1))/CONTROL; \
|
2006-06-18 13:32:43 +00:00
|
|
|
$($(1)_COMMANDS) \
|
2006-06-18 13:09:32 +00:00
|
|
|
)
|
2005-05-09 09:33:23 +00:00
|
|
|
|
2006-08-02 12:07:14 +00:00
|
|
|
$$(IPKG_$(1)): $(PKG_BUILD_DIR)/.built $$(IDIR_$(1))/CONTROL/control
|
2006-04-14 03:03:32 +00:00
|
|
|
$(call Package/$(1)/install,$$(IDIR_$(1)))
|
2006-04-20 03:45:03 +00:00
|
|
|
mkdir -p $(PACKAGE_DIR)
|
2006-05-31 13:27:11 +00:00
|
|
|
-find $$(IDIR_$(1)) -name CVS | xargs rm -rf
|
|
|
|
-find $$(IDIR_$(1)) -name .svn | xargs rm -rf
|
|
|
|
-find $$(IDIR_$(1)) -name '.#*' | xargs rm -f
|
2006-05-10 19:06:22 +00:00
|
|
|
$(RSTRIP) $$(IDIR_$(1))
|
2006-04-14 03:03:32 +00:00
|
|
|
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
2006-07-26 01:01:09 +00:00
|
|
|
@[ -f $$(IPKG_$(1)) ] || false
|
2005-05-12 17:59:08 +00:00
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
$$(INFO_$(1)): $$(IPKG_$(1))
|
2005-05-09 09:33:23 +00:00
|
|
|
$(IPKG) install $$(IPKG_$(1))
|
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
$(1)-clean:
|
2006-04-20 03:45:03 +00:00
|
|
|
rm -f $(PACKAGE_DIR)/$(1)_*
|
2005-05-09 09:33:23 +00:00
|
|
|
|
2006-05-11 22:36:20 +00:00
|
|
|
clean: $(1)-clean
|
|
|
|
|
2006-07-28 17:53:19 +00:00
|
|
|
$(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(PKG_BUILD_DIR)/.prepared
|
2006-10-18 22:07:32 +00:00
|
|
|
-@rm -f $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null
|
2006-07-26 01:01:09 +00:00
|
|
|
@touch $$@
|
|
|
|
|
2006-05-14 10:24:06 +00:00
|
|
|
$$(eval $$(call Build/DefaultTargets,$(1)))
|
2006-09-07 12:14:08 +00:00
|
|
|
|
2006-10-19 06:38:06 +00:00
|
|
|
ifdef Package/$(1)/install
|
2006-11-30 21:39:37 +00:00
|
|
|
ifneq ($$(CONFIG_PACKAGE_$(1))$(DEVELOPER)$(SDK),)
|
2006-10-19 06:38:06 +00:00
|
|
|
ifneq ($(MAKECMDGOALS),prereq)
|
|
|
|
ifneq ($(DUMP),1)
|
|
|
|
ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install '$$(IPKG_$(1))' '$(PKG_BUILD_DIR)'),$$(IPKG_$(1)))
|
|
|
|
$(PKG_BUILD_DIR)/.built: package-rebuild
|
2007-01-20 01:35:13 +00:00
|
|
|
$$(info Rebuilding $(subst $(TOPDIR)/,,$$(IPKG_$(1))))
|
2006-10-19 06:38:06 +00:00
|
|
|
endif
|
2006-09-07 16:48:03 +00:00
|
|
|
endif
|
2006-09-07 12:14:08 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
2005-10-22 01:40:50 +00:00
|
|
|
|
2006-10-14 00:40:27 +00:00
|
|
|
ifneq ($(strip $(PKG_UNPACK)),)
|
2006-05-11 22:36:20 +00:00
|
|
|
define Build/Prepare/Default
|
2006-10-14 13:04:50 +00:00
|
|
|
$(PKG_UNPACK)
|
2006-10-14 15:09:03 +00:00
|
|
|
@if [ -d ./patches -a "$$$$(ls ./patches | wc -l)" -gt 0 ]; then \
|
2006-06-21 06:19:43 +00:00
|
|
|
$(PATCH) $(PKG_BUILD_DIR) ./patches; \
|
2005-04-18 06:17:39 +00:00
|
|
|
fi
|
2006-05-11 22:36:20 +00:00
|
|
|
endef
|
2005-04-18 06:17:39 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-14 03:03:32 +00:00
|
|
|
define Build/Prepare
|
2006-09-18 21:56:07 +00:00
|
|
|
$(call Build/Prepare/Default,)
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
|
|
|
|
2007-02-25 23:10:32 +00:00
|
|
|
CONFIGURE_ARGS := \
|
2006-04-21 09:55:30 +00:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2006-05-24 07:12:59 +00:00
|
|
|
--program-prefix="" \
|
|
|
|
--program-suffix="" \
|
2006-04-21 09:55:30 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2007-02-25 23:10:32 +00:00
|
|
|
$(DISABLE_NLS)
|
|
|
|
|
2007-02-28 13:28:18 +00:00
|
|
|
TARGET_CPPFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
|
|
|
|
TARGET_LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
2007-02-25 23:10:32 +00:00
|
|
|
CONFIGURE_VARS:= \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CXXFLAGS="$(TARGET_CFLAGS)" \
|
2007-02-28 13:28:18 +00:00
|
|
|
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2007-02-25 23:10:32 +00:00
|
|
|
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
|
|
|
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
|
|
|
|
|
2007-02-25 23:55:53 +00:00
|
|
|
CONFIGURE_PATH:=.
|
|
|
|
|
2007-02-25 23:10:32 +00:00
|
|
|
define Build/Configure/Default
|
|
|
|
(cd $(PKG_BUILD_DIR)/$(strip $(3)); \
|
|
|
|
if [ -x configure ]; then \
|
|
|
|
$(CONFIGURE_VARS) \
|
|
|
|
$(2) \
|
2007-02-25 23:55:53 +00:00
|
|
|
$(CONFIGURE_PATH)/configure \
|
2007-02-25 23:10:32 +00:00
|
|
|
$(CONFIGURE_ARGS) \
|
2006-04-21 09:55:30 +00:00
|
|
|
$(1); \
|
2006-08-30 10:30:14 +00:00
|
|
|
fi; \
|
2006-04-21 09:55:30 +00:00
|
|
|
)
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-05-11 22:36:20 +00:00
|
|
|
$(call Build/Configure/Default,)
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
|
|
|
|
2007-02-26 00:10:52 +00:00
|
|
|
MAKE_VARS := \
|
2007-02-26 00:20:39 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CXXFLAGS="$(TARGET_CFLAGS) " \
|
2007-02-26 00:10:52 +00:00
|
|
|
LDFLAGS="$(EXTRA_LDFLAGS) "
|
|
|
|
|
|
|
|
MAKE_FLAGS := \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CROSS="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(ARCH)"
|
|
|
|
|
|
|
|
define Build/Compile/Default
|
|
|
|
$(MAKE_VARS) \
|
2006-08-04 11:59:52 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2007-02-26 00:10:52 +00:00
|
|
|
$(MAKE_FLAGS) \
|
2006-05-15 20:30:26 +00:00
|
|
|
$(1);
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2006-05-15 20:30:26 +00:00
|
|
|
$(call Build/Compile/Default,)
|
2006-04-14 03:03:32 +00:00
|
|
|
endef
|
2005-04-18 06:17:39 +00:00
|
|
|
|
2006-04-19 23:14:13 +00:00
|
|
|
ifneq ($(DUMP),)
|
2006-11-27 03:33:19 +00:00
|
|
|
dumpinfo:
|
2006-04-19 23:14:13 +00:00
|
|
|
else
|
2006-05-11 22:36:20 +00:00
|
|
|
$(PACKAGE_DIR):
|
2006-05-10 20:32:22 +00:00
|
|
|
mkdir -p $@
|
2006-06-20 23:40:02 +00:00
|
|
|
|
2006-10-19 17:32:49 +00:00
|
|
|
ifneq ($(strip $(PKG_SOURCE_URL)),)
|
2006-07-20 17:28:05 +00:00
|
|
|
download: $(DL_DIR)/$(PKG_SOURCE)
|
2006-06-20 23:40:02 +00:00
|
|
|
|
|
|
|
$(DL_DIR)/$(PKG_SOURCE):
|
|
|
|
mkdir -p $(DL_DIR)
|
|
|
|
$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
|
|
|
|
endif
|
2006-04-19 23:14:13 +00:00
|
|
|
|
2006-07-20 17:28:05 +00:00
|
|
|
download:
|
2006-05-11 23:14:04 +00:00
|
|
|
prepare: $(PKG_BUILD_DIR)/.prepared
|
|
|
|
configure: $(PKG_BUILD_DIR)/.configured
|
2005-10-22 01:40:50 +00:00
|
|
|
|
2006-05-31 16:20:27 +00:00
|
|
|
compile-targets:
|
2006-05-11 23:14:04 +00:00
|
|
|
compile: compile-targets
|
2005-10-22 01:40:50 +00:00
|
|
|
|
2006-05-11 23:14:04 +00:00
|
|
|
install-targets:
|
|
|
|
install: install-targets
|
2005-05-12 17:59:08 +00:00
|
|
|
|
2006-05-11 23:14:04 +00:00
|
|
|
clean-targets:
|
2006-05-11 22:36:20 +00:00
|
|
|
clean: FORCE
|
2006-05-10 20:32:22 +00:00
|
|
|
@$(MAKE) clean-targets
|
2006-06-11 00:34:11 +00:00
|
|
|
$(call Build/Clean)
|
2005-05-09 09:33:23 +00:00
|
|
|
rm -rf $(PKG_BUILD_DIR)
|
2006-04-19 23:14:13 +00:00
|
|
|
endif
|