Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 1 | ############################################################# |
| 2 | # |
| 3 | # ncurses |
| 4 | # this installs only a few vital termcap entries |
| 5 | # |
| 6 | ############################################################# |
| 7 | # Copyright (C) 2002 by Ken Restivo <ken@246gt.com> |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 8 | # $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $ |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 9 | # |
| 10 | # This program is free software; you can redistribute it and/or modify |
| 11 | # it under the terms of the GNU Library General Public License as |
| 12 | # published by the Free Software Foundation; either version 2 of the |
| 13 | # License, or (at your option) any later version. |
| 14 | # |
| 15 | # This program is distributed in the hope that it will be useful, but |
| 16 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | # Library General Public License for more details. |
| 19 | # |
| 20 | # You should have received a copy of the GNU Library General Public |
| 21 | # License along with this program; if not, write to the Free Software |
| 22 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 23 | # USA |
| 24 | |
| 25 | # TARGETS |
| 26 | NCURSES_SITE:=ftp://ftp.gnu.org/pub/gnu/ncurses |
| 27 | NCURSES_DIR:=$(BUILD_DIR)/ncurses-5.2 |
| 28 | NCURSES_SOURCE:=ncurses-5.2.tar.gz |
| 29 | |
| 30 | $(DL_DIR)/$(NCURSES_SOURCE): |
Eric Andersen | 8a2597e | 2002-11-20 23:16:10 +0000 | [diff] [blame] | 31 | $(WGET) -P $(DL_DIR) $(NCURSES_SITE)/$(NCURSES_SOURCE) |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 32 | |
| 33 | $(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE) |
Eric Andersen | bb05a9a | 2004-10-09 21:19:47 +0000 | [diff] [blame] | 34 | gunzip -c $(DL_DIR)/$(NCURSES_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 35 | #use the local tic and not whatever the build system was going to find. |
Eric Andersen | 4f889ad | 2003-11-19 17:17:56 +0000 | [diff] [blame] | 36 | $(SED) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \ |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 37 | $(NCURSES_DIR)/misc/run_tic.in |
Eric Andersen | 44eedc5 | 2004-10-09 02:49:33 +0000 | [diff] [blame] | 38 | toolchain/patch-kernel.sh $(NCURSES_DIR) package/ncurses/ ncurses-\*.patch |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 39 | touch $(NCURSES_DIR)/.dist |
| 40 | |
Eric Andersen | e9ee5c4 | 2002-05-31 11:22:31 +0000 | [diff] [blame] | 41 | $(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist |
Eric Andersen | d322f37 | 2003-02-12 08:10:40 +0000 | [diff] [blame] | 42 | (cd $(NCURSES_DIR); rm -rf config.cache; \ |
Eric Andersen | d9540bd | 2003-08-19 06:37:00 +0000 | [diff] [blame] | 43 | BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ |
Eric Andersen | 1fc3f2f | 2003-03-04 19:16:19 +0000 | [diff] [blame] | 44 | $(TARGET_CONFIGURE_OPTS) \ |
Manuel Novoa III | d632d42 | 2003-11-01 05:34:41 +0000 | [diff] [blame] | 45 | CFLAGS="$(TARGET_CFLAGS)" \ |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 46 | ./configure \ |
| 47 | --target=$(GNU_TARGET_NAME) \ |
Eric Andersen | 1fc3f2f | 2003-03-04 19:16:19 +0000 | [diff] [blame] | 48 | --host=$(GNU_TARGET_NAME) \ |
| 49 | --build=$(GNU_HOST_NAME) \ |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 50 | --prefix=/usr \ |
| 51 | --exec-prefix=/usr \ |
| 52 | --bindir=/usr/bin \ |
| 53 | --sbindir=/usr/sbin \ |
| 54 | --sysconfdir=/etc \ |
| 55 | --datadir=/usr/share \ |
| 56 | --localstatedir=/var \ |
| 57 | --mandir=/usr/man \ |
| 58 | --infodir=/usr/info \ |
| 59 | --with-terminfo-dirs=/usr/share/terminfo \ |
| 60 | --with-default-terminfo-dir=/usr/share/terminfo \ |
| 61 | --libdir=$(STAGING_DIR)/lib \ |
Eric Andersen | ef7784a | 2003-01-17 08:03:59 +0000 | [diff] [blame] | 62 | --with-shared --without-cxx --without-cxx-binding \ |
Manuel Novoa III | 0e956fc | 2003-09-03 07:18:18 +0000 | [diff] [blame] | 63 | --without-ada --without-progs $(DISABLE_NLS) \ |
Eric Andersen | d9540bd | 2003-08-19 06:37:00 +0000 | [diff] [blame] | 64 | --without-profile --without-debug --disable-rpath \ |
| 65 | --enable-echo --enable-const --enable-overwrite \ |
Eric Andersen | cbe848f | 2005-03-02 12:33:58 +0000 | [diff] [blame^] | 66 | --enable-broken_linker \ |
Eric Andersen | ef7784a | 2003-01-17 08:03:59 +0000 | [diff] [blame] | 67 | ); |
Eric Andersen | e9ee5c4 | 2002-05-31 11:22:31 +0000 | [diff] [blame] | 68 | touch $(NCURSES_DIR)/.configured |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 69 | |
Eric Andersen | 289395d | 2003-02-12 12:43:15 +0000 | [diff] [blame] | 70 | $(NCURSES_DIR)/lib/libncurses.so.5.2: $(NCURSES_DIR)/.configured |
Eric Andersen | d9540bd | 2003-08-19 06:37:00 +0000 | [diff] [blame] | 71 | $(MAKE) BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ |
| 72 | BUILD_CCFLAGS="-I$(NCURSES_DIR) -I$(NCURSES_DIR)/include" \ |
| 73 | BUILD_LDFLAGS="" DESTDIR=$(STAGING_DIR) -C $(NCURSES_DIR) \ |
| 74 | libs panel menu form headers |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 75 | |
Eric Andersen | 289395d | 2003-02-12 12:43:15 +0000 | [diff] [blame] | 76 | $(STAGING_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so.5.2 |
Eric Andersen | d9540bd | 2003-08-19 06:37:00 +0000 | [diff] [blame] | 77 | BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \ |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 78 | $(MAKE1) \ |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 79 | prefix=$(STAGING_DIR) \ |
| 80 | exec_prefix=$(STAGING_DIR) \ |
| 81 | bindir=$(STAGING_DIR)/bin \ |
| 82 | sbindir=$(STAGING_DIR)/sbin \ |
| 83 | libexecdir=$(STAGING_DIR)/lib \ |
| 84 | datadir=$(STAGING_DIR)/usr/share \ |
| 85 | sysconfdir=$(STAGING_DIR)/etc \ |
| 86 | localstatedir=$(STAGING_DIR)/var \ |
| 87 | libdir=$(STAGING_DIR)/lib \ |
| 88 | infodir=$(STAGING_DIR)/info \ |
| 89 | mandir=$(STAGING_DIR)/man \ |
| 90 | includedir=$(STAGING_DIR)/include \ |
| 91 | gxx_include_dir=$(STAGING_DIR)/include/c++ \ |
Eric Andersen | effd2aa | 2003-01-16 22:04:22 +0000 | [diff] [blame] | 92 | ticdir=$(STAGING_DIR)/usr/share/terminfo \ |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 93 | -C $(NCURSES_DIR) install; |
Eric Andersen | d322f37 | 2003-02-12 08:10:40 +0000 | [diff] [blame] | 94 | chmod a-x $(NCURSES_DIR)/lib/libncurses.so* |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 95 | touch -c $(STAGING_DIR)/lib/libncurses.a |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 96 | |
Eric Andersen | 289395d | 2003-02-12 12:43:15 +0000 | [diff] [blame] | 97 | $(TARGET_DIR)/lib/libncurses.so.5.2: $(STAGING_DIR)/lib/libncurses.a |
Eric Andersen | effd2aa | 2003-01-16 22:04:22 +0000 | [diff] [blame] | 98 | cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/ |
Eric Andersen | e8b26df | 2003-01-02 08:43:57 +0000 | [diff] [blame] | 99 | -cp -dpf $(STAGING_DIR)/usr/lib/terminfo $(TARGET_DIR)/usr/lib/ |
Eric Andersen | effd2aa | 2003-01-16 22:04:22 +0000 | [diff] [blame] | 100 | mkdir -p $(TARGET_DIR)/usr/share/terminfo |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 101 | for i in x/xterm x/xterm-color x/xterm-xfree86 v/vt100 v/vt200 a/ansi l/linux; do \ |
Eric Andersen | effd2aa | 2003-01-16 22:04:22 +0000 | [diff] [blame] | 102 | cp -dpf $(STAGING_DIR)/usr/share/terminfo/$${i} $(TARGET_DIR)/usr/share/terminfo/; \ |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 103 | done |
Mike Frysinger | 5570360 | 2004-10-09 19:26:10 +0000 | [diff] [blame] | 104 | touch -c $(TARGET_DIR)/lib/libncurses.so.5.2 |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 105 | |
Eric Andersen | 289395d | 2003-02-12 12:43:15 +0000 | [diff] [blame] | 106 | $(TARGET_DIR)/usr/lib/libncurses.a: $(STAGING_DIR)/lib/libncurses.a |
Eric Andersen | 46b489f | 2004-10-27 20:09:27 +0000 | [diff] [blame] | 107 | mkdir -p $(TARGET_DIR)/usr/include |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 108 | cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/ncurses.h |
| 109 | cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/ |
Eric Andersen | 24613cb | 2003-01-09 20:28:10 +0000 | [diff] [blame] | 110 | cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/ |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 111 | cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/ |
| 112 | cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/ |
Eric Andersen | d322f37 | 2003-02-12 08:10:40 +0000 | [diff] [blame] | 113 | rm -f $(TARGET_DIR)/usr/lib/terminfo |
| 114 | (cd $(TARGET_DIR)/usr/lib; ln -fs /usr/share/terminfo) |
Eric Andersen | e402401 | 2003-01-08 18:17:28 +0000 | [diff] [blame] | 115 | (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libcurses.a) |
| 116 | (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libtermcap.a) |
| 117 | (cd $(TARGET_DIR)/usr/include; ln -fs ncurses.h curses.h) |
Eric Andersen | d322f37 | 2003-02-12 08:10:40 +0000 | [diff] [blame] | 118 | rm -f $(TARGET_DIR)/lib/libncurses.so |
Eric Andersen | 9647876 | 2004-07-28 19:26:04 +0000 | [diff] [blame] | 119 | (cd $(TARGET_DIR)/usr/lib; ln -fs ../../lib/libncurses.so.5.2 libncurses.so) |
Eric Andersen | 9c63693 | 2003-03-13 20:30:07 +0000 | [diff] [blame] | 120 | -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libncurses.so.5.2 |
Eric Andersen | 8460ba5 | 2003-01-23 01:18:58 +0000 | [diff] [blame] | 121 | touch -c $(TARGET_DIR)/usr/lib/libncurses.a |
Eric Andersen | 0cea77f | 2003-01-08 02:29:25 +0000 | [diff] [blame] | 122 | |
Mike Frysinger | 5570360 | 2004-10-09 19:26:10 +0000 | [diff] [blame] | 123 | ncurses: $(TARGET_DIR)/lib/libncurses.so.5.2 |
| 124 | |
Eric Andersen | e0e8d6e | 2003-01-21 07:34:29 +0000 | [diff] [blame] | 125 | ncurses-headers: $(TARGET_DIR)/usr/lib/libncurses.a |
Eric Andersen | 0cea77f | 2003-01-08 02:29:25 +0000 | [diff] [blame] | 126 | |
Eric Andersen | 0fee9e9 | 2003-11-12 09:31:12 +0000 | [diff] [blame] | 127 | ncurses-source: $(DL_DIR)/$(NCURSES_SOURCE) |
| 128 | |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 129 | ncurses-clean: |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 130 | rm -f $(STAGING_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/libncurses.so* |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 131 | rm -rf $(STAGING_DIR)/usr/share/tabset $(TARGET_DIR)/usr/share/tabset |
Eric Andersen | 80014e7 | 2002-07-23 23:51:46 +0000 | [diff] [blame] | 132 | rm -rf $(STAGING_DIR)/usr/share/terminfo $(TARGET_DIR)/usr/share/terminfo |
Eric Andersen | e8b26df | 2003-01-02 08:43:57 +0000 | [diff] [blame] | 133 | -$(MAKE) -C $(NCURSES_DIR) clean |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 134 | |
Eric Andersen | b0d088b | 2005-01-03 04:38:13 +0000 | [diff] [blame] | 135 | ncurses-dirclean: |
Eric Andersen | 6387962 | 2002-05-23 19:21:23 +0000 | [diff] [blame] | 136 | rm -rf $(NCURSES_DIR) |
Eric Andersen | d06645d | 2005-02-10 03:06:39 +0000 | [diff] [blame] | 137 | ############################################################# |
| 138 | # |
| 139 | # Toplevel Makefile options |
| 140 | # |
| 141 | ############################################################# |
| 142 | ifeq ($(strip $(BR2_PACKAGE_NCURSES)),y) |
| 143 | TARGETS+=ncurses |
| 144 | endif |