From 44af1866aa41cfbbad48583106cb82201ded4fcb Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 27 Sep 2006 14:06:46 +0000 Subject: move tools from toolchain/ to tools/ git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4866 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- tools/ext2fs/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tools/ext2fs/Makefile (limited to 'tools/ext2fs/Makefile') diff --git a/tools/ext2fs/Makefile b/tools/ext2fs/Makefile new file mode 100644 index 0000000000..dd60a7eb9a --- /dev/null +++ b/tools/ext2fs/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=genext2fs +PKG_VERSION:=1.4rc1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk + +define Build/Configure + ( cd $(PKG_BUILD_DIR); \ + ./configure \ + --target=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --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 \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all +endef + +define Build/Install + mkdir -p $(STAGING_DIR)/bin + install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/ +endef + +define Build/Clean + rm -f $(STAGING_DIR)/bin/genext2fs +endef + +$(eval $(call HostBuild)) -- cgit v1.2.3 From c1df5b45043803c52f96c5377fbc858804004590 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 10 Oct 2006 16:36:47 +0000 Subject: fix gene2fs build on freebsd git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5019 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/Makefile | 7 ++++++- tools/Makefile | 13 +++++-------- tools/ext2fs/Makefile | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'tools/ext2fs/Makefile') diff --git a/toolchain/Makefile b/toolchain/Makefile index ed563f00ed..2d8d88219d 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -22,6 +22,7 @@ all: install download: $(TARGETS_DOWNLOAD) install: $(TARGETS_INSTALL) clean: $(TARGETS_CLEAN) +$(TARGETS_INSTALL): $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) uClibc-prepare: kernel-headers-prepare ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) @@ -34,6 +35,10 @@ gcc-install: uClibc-install TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles +$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME): + @mkdir -p $@ + @ln -sf ../lib $@/lib + $(TOOLCHAIN_STAMP_DIR): mkdir -p $@ @@ -43,7 +48,7 @@ $(TOOLCHAIN_BUILD_DIR): %-download: FORCE $(MAKE) -C $(patsubst %-download,%,$@) download -%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOLCHAIN_BUILD_DIR) FORCE +%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) $(TOOLCHAIN_BUILD_DIR) FORCE @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ } diff --git a/tools/Makefile b/tools/Makefile index 741fd48f6a..c8fad23236 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -10,6 +10,7 @@ include $(TOPDIR)/rules.mk TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) +TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y)) TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y)) @@ -25,13 +26,9 @@ TOOL_STAMP_DIR:=$(STAGING_DIR)/stampfiles $(TOOL_STAMP_DIR): mkdir -p $@ -$(STAGING_DIR): - @mkdir -p $@/lib - @mkdir -p $@/include - @mkdir -p $@/include-host - $(CP) ./include/*.h $@/include-host/ - @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib - @mkdir -p $@/$(REAL_GNU_TARGET_NAME) +$(STAGING_DIR)/include-host: + @mkdir -p $@ + @$(CP) ./include/*.h $@/ $(TOOL_BUILD_DIR): @mkdir -p $@ @@ -39,7 +36,7 @@ $(TOOL_BUILD_DIR): %-download: FORCE $(MAKE) -C $(patsubst %-download,%,$@) download -%-prepare: $(TOOL_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE +%-prepare: $(TOOL_STAMP_DIR) $(STAGING_DIR)/include-host $(TOOL_BUILD_DIR) FORCE @[ -f $(TOOL_STAMP_DIR)/.tool_$@ ] || { \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ } diff --git a/tools/ext2fs/Makefile b/tools/ext2fs/Makefile index dd60a7eb9a..f10adbb6c3 100644 --- a/tools/ext2fs/Makefile +++ b/tools/ext2fs/Makefile @@ -42,7 +42,9 @@ define Build/Configure endef define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) all + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="-O2 -I $(STAGING_DIR)/include-host -include getline.h" \ + all endef define Build/Install -- cgit v1.2.3