summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam King <william.king@quentustech.com>2015-10-05 11:18:05 -0700
committerWilliam King <william.king@quentustech.com>2015-10-05 11:18:05 -0700
commit2b598f8d0baa77d33d60b5924cc137af103e7cf5 (patch)
tree93f5eeb9694f568f95e3f89578c52fc7a61e508e
parent5cbd1d17177236f7c4515f077c18d328c76af9b1 (diff)
Adding pkg-config support to libbaresip for the shared lib.
-rw-r--r--.gitignore1
-rw-r--r--Makefile21
2 files changed, 19 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 1b037f2..392a2cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ selftest
# Generated files
src/static.c
build*
+*.pc
diff --git a/Makefile b/Makefile
index a6449a4..c528c35 100644
--- a/Makefile
+++ b/Makefile
@@ -172,6 +172,19 @@ ifneq ($(RANLIB),)
@$(RANLIB) $@
endif
+libbaresip.pc:
+ @echo 'prefix='$(PREFIX) > libbaresip.pc
+ @echo 'exec_prefix=$${prefix}' >> libbaresip.pc
+ @echo 'libdir=$${prefix}/lib' >> libbaresip.pc
+ @echo 'includedir=$${prefix}/include' >> libbaresip.pc
+ @echo '' >> libbaresip.pc
+ @echo 'Name: libbaresip' >> libbaresip.pc
+ @echo 'Description: Baresip is a modular SIP User-Agent with audio and video support' >> libbaresip.pc
+ @echo 'Version: '$(VERSION) >> libbaresip.pc
+ @echo 'URL: http://www.creytiv.com/baresip.html' >> libbaresip.pc
+ @echo 'Libs: -L$${libdir} -lbaresip' >> libbaresip.pc
+ @echo 'Cflags: -I$${includedir}' >> libbaresip.pc
+
# GPROF requires static linking
$(BIN): $(APP_OBJS)
@echo " LD $@"
@@ -222,11 +235,12 @@ install: $(BIN) $(MOD_BINS)
install-dev: install-shared install-static
-install-shared: $(SHARED)
+install-shared: $(SHARED) libbaresip.pc
@mkdir -p $(DESTDIR)$(INCDIR)
$(INSTALL) -Cm 0644 include/baresip.h $(DESTDIR)$(INCDIR)
- @mkdir -p $(DESTDIR)$(LIBDIR)
+ @mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
$(INSTALL) -m 0644 $(SHARED) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 libbaresip.pc $(DESTDIR)$(LIBDIR)/pkgconfig
install-static: $(STATICLIB)
@mkdir -p $(DESTDIR)$(INCDIR)
@@ -239,10 +253,11 @@ uninstall:
@rm -rf $(DESTDIR)$(MOD_PATH)
@rm -f $(DESTDIR)$(PREFIX)/lib/$(SHARED)
@rm -f $(DESTDIR)$(PREFIX)/lib/$(STATICLIB)
+ @rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/libbaresip.pc
.PHONY: clean
clean:
- @rm -rf $(BIN) $(MOD_BINS) $(SHARED) $(BUILD) $(TEST_BIN)
+ @rm -rf $(BIN) $(MOD_BINS) $(SHARED) $(BUILD) $(TEST_BIN) $(STATICLIB) libbaresip.pc
@rm -f *stamp \
`find . -name "*.[od]"` \
`find . -name "*~"` \