--- libebml-0.7.2/make/linux/Makefile.orig 2004-07-19 18:39:13.000000000 +0200 +++ libebml0.7.2/make/linux/Makefile 2004-11-07 13:30:20.287470496 +0100 @@ -30,6 +30,7 @@ INSTALL_OPTS = -m 644 INSTALL_OPTS_LIB = -m 644 INSTALL_DIR_OPTS = -m 755 +LIBTOOL = libtool # Options EXTENSION=.cpp @@ -48,7 +49,7 @@ LIBS= # Names -LIBRARY=libebml.a +LIBRARY=libebml.la # source-files sources:=$(wildcard ${SRC_DIR}*$(EXTENSION)) @@ -59,8 +60,8 @@ # files holding dependency information; replace .cxx extension with .dep dependencies:=$(patsubst %$(EXTENSION),%.dep,$(sources)) -# object files; replace .cxx extension with .o -objects:=$(patsubst %$(EXTENSION),%.o,$(sources)) +# object files; replace .cxx extension with .lo +objects:=$(patsubst %$(EXTENSION),%.lo,$(sources)) WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE) @@ -71,12 +72,11 @@ lib library: $(LIBRARY) # Build rules -%.o: %$(EXTENSION) - $(CXX) -c $(COMPILEFLAGS) -o $@ $< +%.lo: %$(EXTENSION) + $(LIBTOOL) --mode=compile $(CXX) -c $(CXXFLAGS) $(INCLUDE) -o $@ $< $(LIBRARY): $(objects) - $(AR) $@ $(objects) - $(RANLIB) $@ + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) -rpath $(libdir) clean: rm -f $(objects) @@ -89,15 +89,15 @@ $(DEPEND) $(DEPENDFLAGS) $(sources) install: $(LIBRARY) - $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) - $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir) - $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir) + $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir) + $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir) for i in $(INCLUDE_DIR)/*.h; do \ - $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \ + $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \ done - $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c + $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c for i in $(INCLUDE_DIR)/c/*.h; do \ - $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \ + $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \ done # DO NOT DELETE