Commit 8c7611c1 authored by Loren Merritt's avatar Loren Merritt

support pkg-config.

patch by Caro.



git-svn-id: svn://svn.videolan.org/x264/trunk@375 df754926-b1dd-0310-bc7b-ec298dee348c
parent 78d2f605
...@@ -92,7 +92,7 @@ include .depend ...@@ -92,7 +92,7 @@ include .depend
endif endif
clean: clean:
rm -f $(OBJS) $(OBJASM) config.h *.a x264.o matroska.o x264 x264.exe .depend TAGS rm -f $(OBJS) $(OBJASM) config.h *.a x264.o matroska.o x264 x264.exe .depend TAGS x264.pc
rm -f checkasm checkasm.exe tools/checkasm.o rm -f checkasm checkasm.exe tools/checkasm.o
rm -f tools/avc2avi tools/avc2avi.exe tools/avc2avi.o rm -f tools/avc2avi tools/avc2avi.exe tools/avc2avi.o
rm -rf vfw/build/cygwin/bin rm -rf vfw/build/cygwin/bin
...@@ -101,12 +101,19 @@ distclean: clean ...@@ -101,12 +101,19 @@ distclean: clean
rm -f config.mak vfw/build/cygwin/config.mak rm -f config.mak vfw/build/cygwin/config.mak
install: x264 install: x264
install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
install -m 644 x264.h $(DESTDIR)$(includedir) install -m 644 x264.h $(DESTDIR)$(includedir)
install -m 644 libx264.a $(DESTDIR)$(libdir) install -m 644 libx264.a $(DESTDIR)$(libdir)
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
install x264 $(DESTDIR)$(bindir) install x264 $(DESTDIR)$(bindir)
ranlib $(DESTDIR)$(libdir)/libx264.a ranlib $(DESTDIR)$(libdir)/libx264.a
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
rm -f $(DESTDIR)$(bindir)/x264 $(DESTDIR)$(libdir)/pkgconfig/x264.pc
etags: TAGS etags: TAGS
TAGS: TAGS:
......
...@@ -22,9 +22,9 @@ exit 1 ...@@ -22,9 +22,9 @@ exit 1
fi fi
prefix='/usr/local' prefix='/usr/local'
eprefix='${prefix}' exec_prefix='${prefix}'
bindir='${eprefix}/bin' bindir='${exec_prefix}/bin'
libdir='${eprefix}/lib' libdir='${exec_prefix}/lib'
includedir='${prefix}/include' includedir='${prefix}/include'
avis_input="no" avis_input="no"
...@@ -162,7 +162,7 @@ for opt do ...@@ -162,7 +162,7 @@ for opt do
prefix="$optarg" prefix="$optarg"
;; ;;
--exec-prefix=*) --exec-prefix=*)
eprefix="$optarg" exec_prefix="$optarg"
;; ;;
--bindir=*) --bindir=*)
bindir="$optarg" bindir="$optarg"
...@@ -243,7 +243,7 @@ fi ...@@ -243,7 +243,7 @@ fi
rm -f config.mak rm -f config.mak
cat > config.mak << EOF cat > config.mak << EOF
prefix=$prefix prefix=$prefix
eprefix=$eprefix exec_prefix=$exec_prefix
bindir=$bindir bindir=$bindir
libdir=$libdir libdir=$libdir
includedir=$includedir includedir=$includedir
...@@ -269,6 +269,22 @@ EOF ...@@ -269,6 +269,22 @@ EOF
echo "default: x264vfw.dll" >> config.mak echo "default: x264vfw.dll" >> config.mak
fi fi
# x264.pc file creation
rm -f x264.pc
cat > x264.pc << EOF
prefix=$prefix
exec_prefix=$exec_prefix
libdir=$libdir
includedir=$includedir
Name: x264
Description: H.264 (MPEG4 AVC) encoder library
Version:
Libs: -L$libdir -lx264
Cflags: -I$includedir
EOF
echo "Platform: $ARCH" echo "Platform: $ARCH"
echo "System: $SYS" echo "System: $SYS"
echo "avis input: $avis_input" echo "avis input: $avis_input"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment