Use LIBTOOL and build a dynamic library

This commit is contained in:
adam 2006-02-10 20:35:28 +00:00
parent 5d1cd91f0e
commit d604d37b7b
5 changed files with 42 additions and 13 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.10 2006/02/05 23:08:49 joerg Exp $
#
# $NetBSD: Makefile,v 1.11 2006/02/10 20:35:28 adam Exp $
DISTNAME= ode-0.5
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opende/}
EXTRACT_SUFX= .tgz
@ -11,9 +10,9 @@ MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://ode.org/
COMMENT= Library for the simulation of Rigid Body Dynamics
USE_LIBTOOL= yes
USE_TOOLS+= gmake
.include "../../mk/x11.buildlink3.mk"
BUILD_TARGET= ode-lib
INSTALLATION_DIRS= include/ode lib
@ -22,6 +21,8 @@ do-configure:
do-install:
${INSTALL_DATA} ${WRKSRC}/include/ode/*.h ${PREFIX}/include/ode
${INSTALL_DATA} ${WRKSRC}/lib/libode.a ${PREFIX}/lib
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/lib/libode.la \
${PREFIX}/lib
.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2006/01/24 22:45:33 rillig Exp $
@comment $NetBSD: PLIST,v 1.3 2006/02/10 20:35:28 adam Exp $
include/ode/collision.h
include/ode/collision_space.h
include/ode/collision_trimesh.h
@ -20,5 +20,5 @@ include/ode/odecpp_old.h
include/ode/odemath.h
include/ode/rotation.h
include/ode/timer.h
lib/libode.a
lib/libode.la
@dirrm include/ode

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.3 2006/02/05 23:08:49 joerg Exp $
# $NetBSD: buildlink3.mk,v 1.4 2006/02/10 20:35:28 adam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
ODE_BUILDLINK3_MK:= ${ODE_BUILDLINK3_MK}+
@ -11,8 +11,8 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Node}
BUILDLINK_PACKAGES+= ode
.if !empty(ODE_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.ode+= ode>=0.039
BUILDLINK_RECOMMENDED.ode?= ode>=0.5nb1
BUILDLINK_DEPENDS.ode+= ode>=0.5nb2
BUILDLINK_RECOMMENDED.ode?= ode>=0.5nb2
BUILDLINK_PKGSRCDIR.ode?= ../../devel/ode
.endif # ODE_BUILDLINK3_MK

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.3 2006/01/24 22:45:33 rillig Exp $
$NetBSD: distinfo,v 1.4 2006/02/10 20:35:28 adam Exp $
SHA1 (ode-0.5.tgz) = f13756f1192d24101b6d1a3c14feb43efbf0b281
RMD160 (ode-0.5.tgz) = 3410a842731c1bb24f306f4d23509533664321aa
Size (ode-0.5.tgz) = 1710720 bytes
SHA1 (patch-aa) = 216a15a8ebfd7195215e1396ac94c4508fafbf30

View file

@ -0,0 +1,27 @@
$NetBSD: patch-aa,v 1.1 2006/02/10 20:35:28 adam Exp $
--- Makefile.orig 2004-05-18 20:07:45.000000000 +0200
+++ Makefile
@@ -291,7 +291,8 @@ ifeq ($(WINDOWS16),1)
else
# if we have no command-line-length limitation, directly specify all
# object files to be linked.
- $(ODE_LIB_AR_RULE) $(ODE_OBJECTS)
+ ${LIBTOOL} --mode=link ${CC} -o ${ODE_LIB:.a=.la} \
+ ${ODE_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:5
endif
ifdef RANLIB
@@ -329,10 +330,10 @@ clean:
-$(DEL_CMD) OPCODE/*.obj OPCODE/*.o OPCODE/Ice/*.obj OPCODE/Ice/*.o
%$(OBJ): %.c
- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $<
+ ${LIBTOOL} --mode=compile $(CC) $(C_FLAGS) $(CFLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $<
%$(OBJ): %.cpp
- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(INC_OPCODE) $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $<
+ ${LIBTOOL} --mode=compile $(CC) $(C_FLAGS) $(CFLAGS) $(C_INC)$(INCPATH) $(INC_OPCODE) $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $<
%.exe: %$(OBJ)
$(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH)