Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=genext2fs
  10. PKG_VERSION:=1.4rc1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c
  14. PKG_CAT:=zcat
  15. PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. define Build/Configure
  18. ( cd $(PKG_BUILD_DIR); \
  19. ./configure \
  20. --target=$(GNU_HOST_NAME) \
  21. --host=$(GNU_HOST_NAME) \
  22. --build=$(GNU_HOST_NAME) \
  23. --program-prefix="" \
  24. --program-suffix="" \
  25. --prefix=/usr \
  26. --exec-prefix=/usr \
  27. --bindir=/usr/bin \
  28. --sbindir=/usr/sbin \
  29. --libexecdir=/usr/lib \
  30. --sysconfdir=/etc \
  31. --datadir=/usr/share \
  32. --localstatedir=/var \
  33. --mandir=/usr/man \
  34. --infodir=/usr/info \
  35. )
  36. endef
  37. define Build/Compile
  38. $(MAKE) -C $(PKG_BUILD_DIR) \
  39. CFLAGS="-O2 -I $(STAGING_DIR)/include-host -include getline.h" \
  40. all
  41. endef
  42. define Build/Install
  43. mkdir -p $(STAGING_DIR)/bin
  44. install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/
  45. endef
  46. define Build/Clean
  47. rm -f $(STAGING_DIR)/bin/genext2fs
  48. endef
  49. $(eval $(call HostBuild))