--- Makefile.in.orig Thu Nov 26 11:03:29 1998 +++ Makefile.in Mon Oct 16 15:29:06 2000 @@ -15,11 +15,13 @@ CPPFLAGS = $(INCLUDE_DIRS) $(DEFINES) # Installation directories (and install program) +DESTDIR = + prefix = @prefix@ exec_prefix = @exec_prefix@ INSTALL_INCLUDE = @includedir@ INSTALL_LIBRARY = @libdir@ -INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ # Other miscellaneous programs AR = @AR@ @@ -37,23 +39,29 @@ mono.c ordered.c ordered2.c mb_ordered.c LIBSRC = @libsrc@ LIBOBJ = @libobj@ +SHLIBOBJ = $(LIBOBJ:.o=.so) # Other files of interest LIBRARY = libmpeg.a -SHLIB = libmpeg.so +SHLIB = libmpeg.so.13.1 HEADER = mpeg.h EXTRAS = @extras@ +PICFLAG = -fpic + +.SUFFIXES: .o .so + # Implicit targets .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $< +.c.so: + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(PICFLAG) -DPIC $< -o $@ -# Library/cleanup targets: -all: lib $(EXTRAS) +# Library/cleanup targets: lib: $(LIBRARY) @@ -63,17 +71,24 @@ $(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ) $(RANLIB) $(LIBRARY) -$(SHLIB): $(LIBOBJ) - $(CC) -shared -o $(SHLIB) $(LIBOBJ) +$(SHLIB): $(SHLIBOBJ) + $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SHLIBOBJ) +.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes" +all: lib $(EXTRAS) install: $(LIBRARY) - $(INSTALL) -d $(INSTALL_INCLUDE) $(INSTALL_LIBRARY) - $(INSTALL) -m 0644 $(HEADER) $(INSTALL_INCLUDE)/$(HEADER) - $(INSTALL) -m 0644 $(LIBRARY) $(INSTALL_LIBRARY)/$(LIBRARY) - @if test -f $(SHLIB) ; then echo "warning: $(SHLIB) *not* installed (installing shared libraries is too system-specific)" ; fi +.else +all: lib shlib $(EXTRAS) +install: $(LIBRARY) $(SHLIB) +.endif + $(INSTALL_DATA) $(HEADER) $(DESTDIR)$(INSTALL_INCLUDE) + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(INSTALL_LIBRARY) + @if [ -f $(SHLIB) ]; then \ + $(INSTALL_DATA) $(SHLIB) $(DESTDIR)$(INSTALL_LIBRARY); \ + fi clean: - rm -f $(LIBRARY) $(EXTRAS) $(LIBOBJ) core + rm -f $(LIBRARY) $(SHLIB) $(EXTRAS) $(LIBOBJ) $(SHLIBOBJ) core cd extras && $(MAKE) clean distclean: clean