--- Makefile.in.orig Tue Feb 27 04:42:54 1996 +++ Makefile.in Sat Apr 10 21:23:36 1999 @@ -7,7 +7,7 @@ # Various programs and their options CC = @CC@ -OPT = @OPT@ +OPT = @CFLAGS@ DEFS = @DEFS@ INCLUDES = -I. CFLAGS = $(OPT) $(DEFS) $(INCLUDES) @@ -16,6 +16,7 @@ RANLIB = @RANLIB@ SHELL = /bin/sh +.SUFFIXES: .so # Source for the library itself -- note that we define LIBSRC and # LIBOBJ this way (instead of just LIBOBJ=$(LIBSRC:.c=.o) because @@ -27,23 +28,42 @@ mono.c ordered.c ordered2.c mb_ordered.c LIBSRC = @libsrc@ LIBOBJ = @libobj@ +SHLIBOBJ = @shlibobj@ # Other files of interest LIBRARY = libmpeg.a +.if ${PORTOBJFORMAT} == elf +SHLIBRARY = libmpeg.so.1 +.else +SHLIBRARY = libmpeg.so.1.2 +.endif MPEGTEST = mpegtest # Targets for all platforms -all: $(LIBRARY) @extras@ +all: $(LIBRARY) ${SHLIBRARY} @extras@ $(LIBRARY): $(LIBOBJ) $(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ) $(RANLIB) $(LIBRARY) +$(SHLIBRARY): $(SHLIBOBJ) +.if ${PORTOBJFORMAT} == elf + cc -shared -Wl,-soname,$(SHLIBRARY) -o $(SHLIBRARY) $(SHLIBOBJ) +.else + cc -shared -o $(SHLIBRARY) $(SHLIBOBJ) +.endif + ln -sf $(SHLIBRARY) `echo $(SHLIBRARY) | sed 's/\.so.*$$/.so/'` + $(LIBOBJ): Makefile +install: + install -c -m 444 ${LIBRARY} ${SHLIBRARY} ${PREFIX}/lib + (cd ${PREFIX}/lib;ln -sf $(SHLIBRARY) `echo $(SHLIBRARY) | sed 's/\.so.*$$/.so/'`) + install -c -m 444 mpeg.h ${PREFIX}/include + @Makefile_extras@ clean: @@ -53,6 +73,9 @@ distclean: clean rm -f config.cache config.log config.status Makefile config.h cd extras && $(MAKE) distclean + +.c.so: + ${CC} ${CFLAGS} -fpic -DPIC -c $< -o $@ # Include a system-specific Makefile fragment, if any