--- Makefile.in.orig Fri Nov 27 01:03:29 1998 +++ Makefile.in Tue Aug 31 23:11:56 1999 @@ -26,6 +26,7 @@ ARFLAGS = -ru RANLIB = @RANLIB@ +.SUFFIXES: .so # Source for the library itself -- note that we define LIBSRC and # LIBOBJ this way (instead of just LIBOBJ=$(LIBSRC:.c=.o) because @@ -37,12 +38,17 @@ mono.c ordered.c ordered2.c mb_ordered.c LIBSRC = @libsrc@ LIBOBJ = @libobj@ +SHLIBOBJ = @shlibobj@ # Other files of interest LIBRARY = libmpeg.a -SHLIB = libmpeg.so +.if ${PORTOBJFORMAT} == elf +SHLIB = libmpeg.so.1 +.else +SHLIB = libmpeg.so.1.3 +.endif HEADER = mpeg.h EXTRAS = @extras@ @@ -53,7 +59,7 @@ # Library/cleanup targets: -all: lib $(EXTRAS) +all: lib shlib $(EXTRAS) lib: $(LIBRARY) @@ -63,14 +69,18 @@ $(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ) $(RANLIB) $(LIBRARY) -$(SHLIB): $(LIBOBJ) - $(CC) -shared -o $(SHLIB) $(LIBOBJ) - -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 +$(SHLIB): $(SHLIBOBJ) +.if ${PORTOBJFORMAT} == elf + $(CC) -shared -Wl,-soname,$(SHLIB) -o $(SHLIB) $(SHLIBOBJ) +.else + $(CC) -shared -o $(SHLIB) $(SHLIBOBJ) +.endif + ln -sf $(SHLIB) `echo $(SHLIB) | sed 's/\.so.*$$/\.so/'` + +install: + install -c -m 444 ${LIBRARY} ${SHLIB} ${PREFIX}/lib + (cd ${PREFIX}/lib; ln -sf $(SHLIB) `echo $(SHLIB) | sed 's/\.so.*$$/\.so/'`) + install -c -m 444 mpeg.h ${PREFIX}/include clean: rm -f $(LIBRARY) $(EXTRAS) $(LIBOBJ) core @@ -80,6 +90,8 @@ rm -f config.cache config.log config.status Makefile config.h cd extras && $(MAKE) distclean +.c.so: + ${CC} ${CFLAGS} $(INCLUDE_DIRS) -fpic -DPIC -c $< -o $@ # Executable targets (mpegtest, easympeg [GL platforms only])