source: freewrt/package/ncurses/Makefile@ d191f98d

freewrt_1_0 freewrt_2_0
Last change on this file since d191f98d was 4acfd49, checked in by Thorsten Glaser <tg@…>, 19 years ago

compile for the target, not for the host!

git-svn-id: svn://www.freewrt.org/trunk/freewrt@265 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[475ad56]1# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=ncurses
6PKG_VERSION:=5.2
[4acfd49]7PKG_RELEASE:=10
[475ad56]8PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47
9
10PKG_SOURCE_URL:=@GNU/ncurses
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12PKG_CAT:=zcat
13
14PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17include $(TOPDIR)/package/rules.mk
18
19$(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21$(PKG_BUILD_DIR)/.configured:
22 touch $@
23
24$(PKG_BUILD_DIR)/.built:
25 rm -rf $(PKG_INSTALL_DIR)
26 mkdir -p $(PKG_INSTALL_DIR)
27 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
28 ./configure \
[4acfd49]29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
[475ad56]31 --build=$(GNU_HOST_NAME) \
32 --program-prefix="" \
33 --program-suffix="" \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --datadir=/usr/share \
38 --includedir=/usr/include \
39 --infodir=/usr/share/info \
40 --libdir=/usr/lib \
41 --libexecdir=/usr/lib \
42 --localstatedir=/var \
43 --mandir=/usr/share/man \
44 --sbindir=/usr/sbin \
45 --sysconfdir=/etc \
[c57fbc9]46 --disable-nls \
47 --enable-largefile \
[475ad56]48 --enable-echo \
49 --enable-const \
50 --enable-overwrite \
51 --disable-rpath \
52 --without-ada \
53 --without-cxx \
54 --without-cxx-binding \
55 --without-debug \
56 --without-profile \
57 --with-progs \
58 --with-normal \
59 --without-shared \
60 --with-terminfo-dirs=/usr/share/terminfo \
61 --with-default-terminfo-dir=/usr/share/terminfo \
62 );
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 libs install.progs
66 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)" \
69 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
70 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
71 ac_cv_linux_vers="2" \
72 ./configure \
73 --target=$(GNU_TARGET_NAME) \
74 --host=$(GNU_TARGET_NAME) \
75 --build=$(GNU_HOST_NAME) \
76 --program-prefix="" \
77 --program-suffix="" \
78 --prefix=/usr \
79 --exec-prefix=/usr \
80 --bindir=/usr/bin \
81 --datadir=/usr/share \
82 --includedir=/usr/include \
83 --infodir=/usr/share/info \
84 --libdir=/usr/lib \
85 --libexecdir=/usr/lib \
86 --localstatedir=/var \
87 --mandir=/usr/share/man \
88 --sbindir=/usr/sbin \
89 --sysconfdir=/etc \
[c57fbc9]90 --disable-nls \
91 --enable-largefile \
[475ad56]92 --enable-echo \
93 --enable-const \
94 --enable-overwrite \
95 --disable-rpath \
96 --without-ada \
97 --without-cxx \
98 --without-cxx-binding \
99 --without-debug \
100 --without-profile \
101 --without-progs \
102 --with-normal \
103 --with-shared \
104 --with-terminfo-dirs=/usr/share/terminfo \
105 --with-default-terminfo-dir=/usr/share/terminfo \
106 );
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 $(TARGET_CONFIGURE_OPTS) \
109 BUILD_CC="$(TARGET_CC)" \
110 HOSTCC="$(HOSTCC)" \
111 HOSTCCFLAGS="\$$(CPPFLAGS)" \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 libs install.libs install.data
114 touch $@
115
116$(IPKG_LIBNCURSES):
117 install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
119 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo
[a66776f]120 for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 v/vt220 x/xterm x/xterm-color; do \
[475ad56]121 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
122 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \
123 $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
124 done
125 $(RSTRIP) $(IDIR_LIBNCURSES)
126 $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
127
128$(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
129 mkdir -p $(STAGING_DIR)/usr/include
130 $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/
131 $(CP) $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
132 $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/
133 $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
134 $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
135 $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/
136 mkdir -p $(STAGING_DIR)/usr/lib
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
138 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/
139 touch $@
140
141install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
142
143uninstall-dev:
144 rm -rf \
145 $(STAGING_DIR)/usr/include/curses.h \
146 $(STAGING_DIR)/usr/include/{ncurses,panel}.h \
147 $(STAGING_DIR)/usr/include/menu.h \
148 $(STAGING_DIR)/usr/include/panel.h \
149 $(STAGING_DIR)/usr/include/term{,cap}.h \
150 $(STAGING_DIR)/usr/include/unctrl.h \
151 $(STAGING_DIR)/usr/lib/libcurses.so \
152 $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
153
154compile-targets: install-dev
155clean-targets: uninstall-dev
156
Note: See TracBrowser for help on using the repository browser.