$NetBSD: patch-ad,v 1.1 2006/02/18 14:07:54 joerg Exp $ --- src/makeinclude_tmpl.orig 2006-02-01 17:48:42.000000000 +0000 +++ src/makeinclude_tmpl @@ -50,6 +50,14 @@ LIBRARY = $(EFLTK_TOPDIR)/lib/$(LIBNAME) DSO = $(EFLTK_TOPDIR)/lib/$(LIBNAME) DSONAME = $(LIBNAME)$(DSOEXT) +libtool: ${LIBRARY}.la +ifneq ($(DIRS), ) + @for dir in $(DIRS); do\ + if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\ + (cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\ + done +endif + static: $(LIBRARY)$(LIBEXT) ifneq ($(DIRS), ) @for dir in $(DIRS); do\ @@ -72,6 +80,10 @@ $(LIBRARY).a: $(STATIC_OBJECTS) @$(LIBCOMMAND) $@ $(STATIC_OBJECTS) @$(RANLIB) $@ +$(LIBRARY).la: $(OBJECTS:.o=.lo) + ${LIBTOOL} --mode=link ${CXX} -o $@ ${CXXFLAGS} ${LDFLAGS} \ + -rpath ${libdir} -version-info 2:0 ${OBJECTS:.o=.lo} ${DSOLIBS} + $(DSO).so.$(FL_API_VERSION) $(DSO).sl.$(FL_API_VERSION): $(SHARED_OBJECTS) @rm -f $@ @echo $(DSOCOMMAND) $(DSONAME) ... @@ -112,6 +124,16 @@ ifneq ($(DIRS), ) done endif +install_libtool: libtool + ${BSD_INSTALL_DATA_DIR} ${libdir} + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIBRARY}.la ${libdir} +ifneq ($(DIRS), ) + @for dir in $(DIRS); do\ + if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\ + (cd $$dir;$(MAKE) $(MFLAGS) install_libtool) || exit;\ + done +endif + install_shared: shared @echo "Installing shared libraries..." @mkdir -p $(libdir) @@ -140,6 +162,14 @@ ifneq ($(DIRS), ) done endif +libtool: ${OBJECTS:.o=.lo} +ifneq ($(DIRS), ) + @for dir in $(DIRS); do\ + if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\ + (cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\ + done +endif + shared: $(SHARED_OBJECTS) ifneq ($(DIRS), ) @for dir in $(DIRS); do\ @@ -156,6 +186,14 @@ ifneq ($(DIRS), ) done endif +install_libtool: libtool +ifneq ($(DIRS), ) + @for dir in $(DIRS); do\ + if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\ + (cd $$dir;$(MAKE) $(MFLAGS) install_libtool) || exit;\ + done +endif + install_shared: shared ifneq ($(DIRS), ) @for dir in $(DIRS); do\ @@ -204,12 +242,7 @@ install_programs: $(PROGRAM) ifneq ($(PROGRAM), ) @echo Installing $(PROGRAM).. @mkdir -p $(bindir) - @if [ ! "$(OSTYPE)" = "cygwin32" ]; then \ - cp $(EFLTK_BINDIR)/$(PROGRAM) $(bindir)/; \ - chmod 755 $(bindir)/$(PROGRAM); \ - else \ - cp $(EFLTK_BINDIR)/$(PROGRAM).exe $(bindir)/; \ - fi + ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} ${EFLTK_BINDIR}/${PROGRAM} ${bindir} endif ifneq ($(DIRS), ) @for dir in $(DIRS); do\ @@ -222,11 +255,7 @@ ifneq ($(PROGRAM), ) $(PROGRAM): $(OBJECTS) @echo Linking $(PROGRAM)... - $(CXX) -o $(EFLTK_BINDIR)/$(PROGRAM) $(OBJECTS) $(PROGRAM_LIBS) $(LDLIBS) -ifneq ($(STRIP), ) - @$(STRIP) $(EFLTK_BINDIR)/$(PROGRAM)$(EXEEXT) -endif - + ${LIBTOOL} $(CXX) -o $(EFLTK_BINDIR)/$(PROGRAM) $(OBJECTS) $(PROGRAM_LIBS) $(LDLIBS) endif uninstall: