1 #############################################################
4 # this installs only a few vital termcap entries
6 #############################################################
7 # Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
8 # $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $
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.
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.
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
27 NCURSES_SITE
:=ftp
://ftp.gnu.org
/pub
/gnu
/ncurses
28 NCURSES_DIR
:=$(BUILD_DIR
)/ncurses-
$(NCURSES_VER
)
29 NCURSES_SOURCE
:=ncurses-
$(NCURSES_VER
).
tar.gz
31 $(DL_DIR
)/$(NCURSES_SOURCE
):
32 $(WGET
) -P
$(DL_DIR
) $(NCURSES_SITE
)/$(NCURSES_SOURCE
)
34 $(NCURSES_DIR
)/.
dist: $(DL_DIR
)/$(NCURSES_SOURCE
)
35 gunzip
-c
$(DL_DIR
)/$(NCURSES_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
36 #use the local tic and not whatever the build system was going to find.
37 $(SED
) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \
38 $(NCURSES_DIR
)/misc
/run_tic.in
39 toolchain
/patch-kernel.sh
$(NCURSES_DIR
) package
/ncurses
/ ncurses\
*.patch
40 $(CONFIG_UPDATE
) $(NCURSES_DIR
)
41 touch
$(NCURSES_DIR
)/.
dist
43 $(NCURSES_DIR
)/.configured
: $(NCURSES_DIR
)/.
dist
44 (cd
$(NCURSES_DIR
); rm -rf config.cache
; \
46 $(TARGET_CONFIGURE_OPTS
) \
47 CFLAGS
="$(TARGET_CFLAGS)" \
49 --target
=$(GNU_TARGET_NAME
) \
50 --host
=$(GNU_TARGET_NAME
) \
51 --build
=$(GNU_HOST_NAME
) \
57 --datadir=/usr
/share \
58 --localstatedir
=/var \
61 --with-terminfo-dirs
=/usr
/share
/terminfo \
62 --with-default-terminfo-dir
=/usr
/share
/terminfo \
63 --libdir=$(STAGING_DIR
)/lib \
64 --with-shared
--without-cxx
--without-cxx-binding \
65 --without-ada
--without-progs
$(DISABLE_NLS
) \
66 --without-profile
--without-debug
--disable-rpath \
67 --enable-echo
--enable-const
--enable-overwrite \
68 --enable-broken_linker \
70 touch
$(NCURSES_DIR
)/.configured
72 $(NCURSES_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
): $(NCURSES_DIR
)/.configured
73 $(MAKE1
) DESTDIR
=$(STAGING_DIR
) -C
$(NCURSES_DIR
) \
74 libs panel menu form headers
76 $(STAGING_DIR
)/lib
/libncurses.a
: $(NCURSES_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
)
78 prefix=$(STAGING_DIR
) \
79 exec_prefix=$(STAGING_DIR
) \
80 bindir=$(STAGING_DIR
)/bin \
81 sbindir
=$(STAGING_DIR
)/sbin \
82 libexecdir
=$(STAGING_DIR
)/lib \
83 datadir=$(STAGING_DIR
)/usr
/share \
84 sysconfdir
=$(STAGING_DIR
)/etc \
85 localstatedir
=$(STAGING_DIR
)/var \
86 libdir=$(STAGING_DIR
)/lib \
87 infodir=$(STAGING_DIR
)/info \
88 mandir=$(STAGING_DIR
)/man \
89 includedir=$(STAGING_DIR
)/include \
90 gxx_include_dir
=$(STAGING_DIR
)/include/c
++ \
91 ticdir
=$(STAGING_DIR
)/usr
/share
/terminfo \
92 -C
$(NCURSES_DIR
) install;
93 chmod a-x
$(NCURSES_DIR
)/lib
/libncurses.so
*
94 touch
-c
$(STAGING_DIR
)/lib
/libncurses.a
96 $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
): $(STAGING_DIR
)/lib
/libncurses.a
97 cp
-dpf
$(NCURSES_DIR
)/lib
/libncurses.so
* $(TARGET_DIR
)/lib
/
98 -cp
-dpf
$(STAGING_DIR
)/usr
/lib
/terminfo
$(TARGET_DIR
)/usr
/lib
/
99 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/x
100 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm
$(TARGET_DIR
)/usr
/share
/terminfo
/x
101 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm-color
$(TARGET_DIR
)/usr
/share
/terminfo
/x
102 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm-xfree86
$(TARGET_DIR
)/usr
/share
/terminfo
/x
103 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/v
104 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt100
$(TARGET_DIR
)/usr
/share
/terminfo
/v
105 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt200
$(TARGET_DIR
)/usr
/share
/terminfo
/v
106 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/a
107 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/a
/ansi
$(TARGET_DIR
)/usr
/share
/terminfo
/a
108 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/l
109 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/l
/linux
$(TARGET_DIR
)/usr
/share
/terminfo
/l
110 -$(SAFE_STRIP
) $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
)
111 touch
-c
$(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
)
113 $(TARGET_DIR
)/usr
/lib
/libncurses.a
: $(STAGING_DIR
)/lib
/libncurses.a
114 mkdir
-p
$(TARGET_DIR
)/usr
/include
115 cp
-dpf
$(NCURSES_DIR
)/include/curses.h
$(TARGET_DIR
)/usr
/include/ncurses.h
116 cp
-dpf
$(NCURSES_DIR
)/include/term.h
$(TARGET_DIR
)/usr
/include/
117 cp
-dpf
$(NCURSES_DIR
)/include/unctrl.h
$(TARGET_DIR
)/usr
/include/
118 cp
-dpf
$(NCURSES_DIR
)/include/termcap.h
$(TARGET_DIR
)/usr
/include/
119 cp
-dpf
$(NCURSES_DIR
)/lib
/libncurses.a
$(TARGET_DIR
)/usr
/lib
/
120 rm -f
$(TARGET_DIR
)/usr
/lib
/terminfo
121 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs
/usr
/share
/terminfo
)
122 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs libncurses.a libcurses.a
)
123 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs libncurses.a libtermcap.a
)
124 (cd
$(TARGET_DIR
)/usr
/include; ln
-fs ncurses.h curses.h
)
125 rm -f
$(TARGET_DIR
)/lib
/libncurses.so
126 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs ..
/..
/lib
/libncurses.so.
$(NCURSES_VER
) libncurses.so
)
127 -$(SAFE_STRIP
) $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
)
128 touch
-c
$(TARGET_DIR
)/usr
/lib
/libncurses.a
130 ncurses
: $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VER
)
132 ncurses-headers
: $(TARGET_DIR
)/usr
/lib
/libncurses.a
134 ncurses-source
: $(DL_DIR
)/$(NCURSES_SOURCE
)
137 rm -f
$(STAGING_DIR
)/lib
/libncurses.so
* $(TARGET_DIR
)/lib
/libncurses.so
*
138 rm -rf
$(STAGING_DIR
)/usr
/share
/tabset
$(TARGET_DIR
)/usr
/share
/tabset
139 rm -rf
$(STAGING_DIR
)/usr
/share
/terminfo
$(TARGET_DIR
)/usr
/share
/terminfo
140 -$(MAKE
) -C
$(NCURSES_DIR
) clean
143 rm -rf
$(NCURSES_DIR
)
144 #############################################################
146 # Toplevel Makefile options
148 #############################################################
149 ifeq ($(strip $(BR2_PACKAGE_NCURSES
)),y
)
152 ifeq ($(strip $(BR2_PACKAGE_NCURSES_TARGET_HEADERS
)),y
)
153 TARGETS
+=ncurses-headers