netbsd-help: Re: Using instead of

Subject: Re: Using instead of
To: Tor Stormwall <tor@stormwall.org>
From: Miguel Mendez <flynn@energyhq.homeip.net>
List: netbsd-help
Date: 10/03/2002 10:51:59
On 03 Oct 2002 10:20:55 +0200
Tor Stormwall <tor@stormwall.org> wrote:
Hi,
> I installed ncurses from pkgsrc. How am I able to use it? 
> Compiling with -lncurses does not work. The ncurses.h is located
> in /usr/pkgsrc/include/.
You could have a simple Makefile like this, assumes your PREFIX is /usr/pkg
-----------------
PREFIX=/usr/pkg
CFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib -Wl,-rpath -Wl,${PREFIX}/lib -lncurses
OBJECTS=	foo.o bar.o baz.o
all:	${OBJECTS}
	${CC} ${LDFLAGS} -o foo ${OBJECTS}
clean:
	rm -f *.o *.core foo
---------------
Cheers,
-- 
 Miguel Mendez - flynn@energyhq.homeip.net
 GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt
 EnergyHQ :: http://www.energyhq.tk
 NetBSD :: Unix without hype

AltStyle によって変換されたページ (->オリジナル) /