1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/graphics/mpeg-lib/files/patch-aa

74 lines
1.8 KiB
Plaintext
Raw Normal View History

1999-04-11 03:01:57 +00:00
--- 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
1998-09-19 19:06:50 +00:00
@@ -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
1998-09-19 19:06:50 +00:00
+.if ${PORTOBJFORMAT} == elf
+SHLIBRARY = libmpeg.so.1
+.else
+SHLIBRARY = libmpeg.so.1.2
1998-09-19 19:06:50 +00:00
+.endif
MPEGTEST = mpegtest
# Targets for all platforms
-all: $(LIBRARY) @extras@
+all: $(LIBRARY) ${SHLIBRARY} @extras@
$(LIBRARY): $(LIBOBJ)
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
+$(SHLIBRARY): $(SHLIBOBJ)
1998-09-19 19:06:50 +00:00
+.if ${PORTOBJFORMAT} == elf
+ cc -shared -Wl,-soname,$(SHLIBRARY) -o $(SHLIBRARY) $(SHLIBOBJ)
+.else
+ cc -shared -o $(SHLIBRARY) $(SHLIBOBJ)
1998-09-19 19:06:50 +00:00
+.endif
+ ln -sf $(SHLIBRARY) `echo $(SHLIBRARY) | sed 's/\.so.*$$/.so/'`
+
$(LIBOBJ): Makefile
+install:
+ install -c -m 444 ${LIBRARY} ${SHLIBRARY} ${PREFIX}/lib
1998-09-19 19:06:50 +00:00
+ (cd ${PREFIX}/lib;ln -sf $(SHLIBRARY) `echo $(SHLIBRARY) | sed 's/\.so.*$$/.so/'`)
+ install -c -m 444 mpeg.h ${PREFIX}/include
+
@Makefile_extras@
clean:
1998-09-19 19:06:50 +00:00
@@ -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