microcom.mk 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #############################################################
  2. #
  3. # microcom terminal emulator
  4. #
  5. # Maintainer: Tim Riker <Tim@Rikers.org>
  6. #
  7. #############################################################
  8. # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
  9. # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU Library General Public License as
  13. # published by the Free Software Foundation; either version 2 of the
  14. # License, or (at your option) any later version.
  15. #
  16. # This program is distributed in the hope that it will be useful, but
  17. # WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. # Library General Public License for more details.
  20. #
  21. # You should have received a copy of the GNU Library General Public
  22. # License along with this program; if not, write to the Free Software
  23. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  24. # USA
  25. # TARGETS
  26. # http://microcom.port5.com/m102.tar.gz
  27. MICROCOM_VERSION:=1.02
  28. MICROCOM_SITE:=http://buildroot.net/downloads/sources/
  29. MICROCOM_SOURCE:=m102.tar.gz
  30. MICROCOM_DIR:=$(BUILD_DIR)/microcom-$(MICROCOM_VERSION)
  31. $(DL_DIR)/$(MICROCOM_SOURCE):
  32. $(call DOWNLOAD,$(MICROCOM_SITE),$(MICROCOM_SOURCE))
  33. microcom-source: $(DL_DIR)/$(MICROCOM_SOURCE)
  34. $(MICROCOM_DIR)/.unpacked: $(DL_DIR)/$(MICROCOM_SOURCE)
  35. mkdir -p $(MICROCOM_DIR)
  36. $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(MICROCOM_DIR) $(TAR_OPTIONS) -
  37. toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/ \*.patch
  38. touch $@
  39. $(MICROCOM_DIR)/.configured: $(MICROCOM_DIR)/.unpacked
  40. $(SED) 's~gcc~$$(CC)~' -e 's~-O~$$(CFLAGS)~' $(MICROCOM_DIR)/Makefile
  41. touch $@
  42. $(MICROCOM_DIR)/microcom: $(MICROCOM_DIR)/.configured
  43. ifeq ($(BR2_PREFER_IMA),y)
  44. (cd $(MICROCOM_DIR); \
  45. $(TARGET_CC) $(TARGET_CFLAGS) $(CFLAGS_COMBINE) \
  46. $(CFLAGS_WHOLE_PROGRAM) -o $@ $(wildcard $(MICROCOM_DIR)/*.c); \
  47. )
  48. else
  49. $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(MICROCOM_DIR)
  50. endif
  51. $(STRIPCMD) $(STRIP_STRIP_ALL) $@
  52. $(TARGET_DIR)/usr/bin/microcom: $(MICROCOM_DIR)/microcom
  53. install -c $(MICROCOM_DIR)/microcom $(TARGET_DIR)/usr/bin/microcom
  54. microcom-clean:
  55. rm -f $(MICROCOM_DIR)/*.o $(MICROCOM_DIR)/microcom \
  56. $(TARGET_DIR)/usr/bin/microcom
  57. microcom-dirclean:
  58. rm -rf $(MICROCOM_DIR)
  59. microcom: uclibc $(TARGET_DIR)/usr/bin/microcom
  60. #############################################################
  61. #
  62. # Toplevel Makefile options
  63. #
  64. #############################################################
  65. ifeq ($(BR2_PACKAGE_MICROCOM),y)
  66. TARGETS+=microcom
  67. endif