openbsd-ports/graphics/mpeg-lib/patches/patch-aa
2000-01-09 05:56:33 +00:00

81 lines
2.1 KiB
Plaintext

--- Makefile.in.orig Thu Nov 26 11:03:29 1998
+++ Makefile.in Thu Dec 23 22:55:03 1999
@@ -19,13 +19,14 @@
exec_prefix = @exec_prefix@
INSTALL_INCLUDE = @includedir@
INSTALL_LIBRARY = @libdir@
-INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
# Other miscellaneous programs
AR = @AR@
ARFLAGS = -ru
RANLIB = @RANLIB@
+.SUFFIXES: .c .o .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,13 @@
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
+SHLIB = libmpeg.so.13.1
HEADER = mpeg.h
EXTRAS = @extras@
@@ -50,10 +52,16 @@
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
+.c.so:
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fpic -DPIC $< -o $@
# Library/cleanup targets:
+.if defined(NO_SHARED_LIBRARY) && ${NO_SHARED_LIBRARY:U} == YES
all: lib $(EXTRAS)
+.else
+all: lib shlib $(EXTRAS)
+.endif
lib: $(LIBRARY)
@@ -63,17 +71,22 @@
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
-$(SHLIB): $(LIBOBJ)
- $(CC) -shared -o $(SHLIB) $(LIBOBJ)
+$(SHLIB): $(SHLIBOBJ)
+ ld -Bshareable -Bforcearchive -o $(SHLIB) $(SHLIBOBJ)
+.if defined(NO_SHARED_LIBRARY) && ${NO_SHARED_LIBRARY:U} == YES
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
+install: $(LIBRARY) $(SHLIB)
+.endif
+ $(INSTALL_DATA) $(HEADER) $(INSTALL_INCLUDE)/$(HEADER)
+ $(INSTALL_DATA) $(LIBRARY) $(INSTALL_LIBRARY)/$(LIBRARY)
+ @if [ -f $(SHLIB) ]; then \
+ $(INSTALL_DATA) $(SHLIB) $(INSTALL_LIBRARY)/$(SHLIB) ;\
+ fi
clean:
- rm -f $(LIBRARY) $(EXTRAS) $(LIBOBJ) core
+ rm -f $(LIBRARY) $(SHLIB) $(EXTRAS) $(LIBOBJ) core
cd extras && $(MAKE) clean
distclean: clean