- convert to use libtool (resulting in a shared library)

This commit is contained in:
Dieter Baron 2005-03-02 17:10:00 +00:00 committed by Thomas Klausner
parent f2bbc5d37a
commit c41185ade7
5 changed files with 38 additions and 18 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2004/05/09 23:09:28 dillo Exp $
# $NetBSD: Makefile,v 1.3 2005/03/02 17:10:00 dillo Exp $
#
DISTNAME= glkterm-078
@ -17,14 +17,7 @@ INCOMPAT_CURSES+= NetBSD-1.4[Y-Z]* NetBSD-1.5* NetBSD-1.6-* NetBSD-1.6.*
INCOMPAT_CURSES+= NetBSD-1.6[A-L]*
USE_BUILDLINK3= yes
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/include/glkterm
for f in Make.glkterm gi_blorb.h gi_dispa.h glk.h glkstart.h; \
do \
${INSTALL_DATA} ${WRKSRC}/$$f ${PREFIX}/include/glkterm; \
done
${INSTALL_DATA} ${WRKSRC}/libglkterm.a ${PREFIX}/lib
USE_LIBTOOL= yes
.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,8 +1,8 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/21 11:49:05 dillo Exp $
@comment $NetBSD: PLIST,v 1.2 2005/03/02 17:10:00 dillo Exp $
include/glkterm/Make.glkterm
include/glkterm/gi_blorb.h
include/glkterm/gi_dispa.h
include/glkterm/glk.h
include/glkterm/glkstart.h
lib/libglkterm.a
lib/libglkterm.la
@dirrm include/glkterm

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.1 2004/05/23 23:20:04 dillo Exp $
# $NetBSD: buildlink3.mk,v 1.2 2005/03/02 17:10:00 dillo Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
GLKTERM_BUILDLINK3_MK:= ${GLKTERM_BUILDLINK3_MK}+
@ -13,7 +13,7 @@ BUILDLINK_PACKAGES+= glkterm
.if !empty(GLKTERM_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.glkterm+= glkterm>=0.7.8
BUILDLINK_PKGSRCDIR.glkterm?= ../../wip/glkterm
BUILDLINK_DEPMETHOD.glkterm?= build
#BUILDLINK_DEPMETHOD.glkterm?= build
BUILDLINK_TRANSFORM+= l:glk:glkterm
BUILDLINK_TARGETS+= buildlink-glkterm-hook

View file

@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.2 2004/08/27 06:30:28 jlamwww Exp $
$NetBSD: distinfo,v 1.3 2005/03/02 17:10:00 dillo Exp $
SHA1 (glkterm-078.tar.Z) = 813bdd8e6c03ffc18ef3714edd5fcb52e0829e76
Size (glkterm-078.tar.Z) = 98911 bytes
SHA1 (patch-aa) = 6dfb4f27a1eaf0271f71a2c2681b49b69d98654c
SHA1 (patch-aa) = e2b04877cb645a54ff4a2daeb5743321d29c0d58

View file

@ -1,8 +1,8 @@
$NetBSD: patch-aa,v 1.2 2004/08/27 06:30:29 jlamwww Exp $
$NetBSD: patch-aa,v 1.3 2005/03/02 17:10:05 dillo Exp $
--- Makefile.orig Mon Dec 20 01:21:49 1999
+++ Makefile
@@ -10,16 +10,16 @@
@@ -10,18 +10,19 @@
# Pick a C compiler.
#CC = cc
@ -21,5 +21,32 @@ $NetBSD: patch-aa,v 1.2 2004/08/27 06:30:29 jlamwww Exp $
-CFLAGS = $(OPTIONS) $(INCLUDEDIRS)
+#CFLAGS = $(OPTIONS) $(INCLUDEDIRS)
GLKLIB = libglkterm.a
-GLKLIB = libglkterm.a
+GLKINCDIR=${PREFIX}/include/glkterm
+GLKLIB = libglkterm.la
GLKTERM_OBJS = \
main.o gtevent.o gtfref.o gtgestal.o gtinput.o \
@@ -35,9 +36,20 @@ GLKTERM_HEADERS = \
all: $(GLKLIB) Make.glkterm
+install: all
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} $(GLKLIB) ${PREFIX}/lib
+ ${BSD_INSTALL_DATA_DIR} ${GLKINCDIR}
+ ${BSD_INSTALL_DATA} gi_blorb.h ${GLKINCDIR}
+ ${BSD_INSTALL_DATA} gi_dispa.h ${GLKINCDIR}
+ ${BSD_INSTALL_DATA} glk.h ${GLKINCDIR}
+ ${BSD_INSTALL_DATA} glkstart.h ${GLKINCDIR}
+ ${BSD_INSTALL_DATA} Make.glkterm ${GLKINCDIR}
+
+.c.o:
+ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c -o $@ $<
+
$(GLKLIB): $(GLKTERM_OBJS)
- ar r $(GLKLIB) $(GLKTERM_OBJS)
- ranlib $(GLKLIB)
+ ${LIBTOOL} --mode=link ${CC} -o $(GLKLIB) ${GLKTERM_OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:7 ${LIBS}
Make.glkterm:
echo LINKLIBS = $(LIBDIRS) $(LIBS) > Make.glkterm