Skip to content

Commit

Permalink
Add mechanism for updating version in pkg-config file
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu authored and foo86 committed Mar 26, 2015
1 parent cd8c008 commit e94bfe2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VERSION = 0.0.0

CC = gcc
AR = ar
override CFLAGS := -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wall -Wextra -O3 -g -MMD $(CFLAGS)
Expand Down Expand Up @@ -125,7 +127,7 @@ clean:

.PHONY: dcadec.pc
dcadec.pc: dcadec.pc.in
sed "s,%PREFIX%,$(PREFIX),;s,%LIBDIR%,$(LIBDIR),;s,%INCLUDEDIR%,$(INCLUDEDIR)," dcadec.pc.in > dcadec.pc
sed 's,%PREFIX%,$(PREFIX),;s,%LIBDIR%,$(LIBDIR),;s,%INCLUDEDIR%,$(INCLUDEDIR),;s,%VERSION%,$(VERSION),' $< > $@

install: $(OUT_LIB) $(OUT_DEC) dcadec.pc
install -d -m 755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(PKG_CONFIG_PATH) $(DESTDIR)$(INCLUDEDIR)/libdcadec $(DESTDIR)$(BINDIR)
Expand Down
2 changes: 1 addition & 1 deletion dcadec.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ includedir=%INCLUDEDIR%

Name: dcadec
Description: a free DTS Coherent Acoustics decoder with support for HD extensions
Version: 0.0.0
Version: %VERSION%
Libs: -L${libdir} -ldcadec
Cflags: -I${includedir}

0 comments on commit e94bfe2

Please sign in to comment.