Commit 9c1171d7 authored by Dominik Mierzejewski's avatar Dominik Mierzejewski
Browse files

pkgconfig support

parent 20376cb6
......@@ -50,12 +50,12 @@ BUILDDEPS = Makefile config.mak
ifeq ($(BUILD_SHARED),yes)
all: $(SHLIB) $(DVDREAD_SHLIB) dvdread-config
install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdread-config
install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdread-config install-dvdread.pc
ifeq ($(BUILD_STATIC),yes)
all: $(LIB) $(DVDREAD_LIB) dvdread-config
install: $(LIB) $(DVDREAD_LIB) install-static install-dvdread-config
install: $(LIB) $(DVDREAD_LIB) install-static install-dvdread-config install-dvdread.pc
install: install-headers
......@@ -146,6 +146,22 @@ install-dvdread-config: dvdread-config
install -d $(DESTDIR)$(PREFIX)/bin
install -m 0755 $(.OBJDIR)/dvdread-config $(DESTDIR)$(PREFIX)/bin/dvdread-config
dvdread.pc: $(.OBJDIR)
@echo 'prefix=$(PREFIX)' > $(.OBJDIR)/dvdread.pc
@echo 'libdir=$(shlibdir)' >> $(.OBJDIR)/dvdread.pc
@echo 'includedir=$(PREFIX)/include' >> $(.OBJDIR)/dvdread.pc
@echo >> $(.OBJDIR)/dvdread.pc
@echo 'Libs: -L$${libdir} -ldvdread' >> $(.OBJDIR)/dvdread.pc
@echo 'Cflags: -I$${includedir}' >> $(.OBJDIR)/dvdread.pc
@echo >> $(.OBJDIR)/dvdread.pc
@echo 'Name: dvdread' >> $(.OBJDIR)/dvdread.pc
@echo 'Description: Library for reading DVDs' >> $(.OBJDIR)/dvdread.pc
@echo 'Version: $(SHLIB_VERSION)' >> $(.OBJDIR)/dvdread.pc
install-dvdread.pc: dvdread.pc
install -d $(DESTDIR)$(shlibdir)/pkgconfig
install -m 0644 $(.OBJDIR)/dvdread.pc $(DESTDIR)$(shlibdir)/pkgconfig/dvdread.pc
vpath ${.OBJDIR}
vpath %.o ${.OBJDIR}
vpath ${LIB} ${.OBJDIR}
Supports Markdown
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