blob: 11d7e7fa61cea80bce910fc2e59c64f1837ff208 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
commit f96d9f9d2e3ba39352035e6ac26463243484d404
Author: Sebastian Kemper <sebastian_ml@gmx.net>
Date: Sun Jan 13 19:25:52 2019 +0100
Setup .pc file to allow use for cross-compiling
The Makefile is currently creating the pkg-config file using static lib
and include dir statements. Change that so that projects that
cross-compile hiredis can use pkg-config to setup other programs
depending on it.
Note: these projects (like OpenWrt) call pkg-config with arguments to
overwrite some variables in the .pc file, namely:
--define-variable=prefix=<...>
--define-variable=exec_prefix=<...>
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
--- a/Makefile
+++ b/Makefile
@@ -234,8 +234,8 @@ $(PKGCONFNAME): hiredis.h
@echo "Generating $@ for pkgconfig..."
@echo prefix=$(PREFIX) > $@
@echo exec_prefix=\$${prefix} >> $@
- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
+ @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
+ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
@echo >> $@
@echo Name: hiredis >> $@
@echo Description: Minimalistic C client library for Redis. >> $@
|