diff options
Diffstat (limited to 'utils/nwztools/upgtools/Makefile')
-rw-r--r-- | utils/nwztools/upgtools/Makefile | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/utils/nwztools/upgtools/Makefile b/utils/nwztools/upgtools/Makefile index fcfc889ae6..046eb1a1a9 100644 --- a/utils/nwztools/upgtools/Makefile +++ b/utils/nwztools/upgtools/Makefile | |||
@@ -3,9 +3,23 @@ CC=gcc | |||
3 | CXX=g++ | 3 | CXX=g++ |
4 | LD=g++ | 4 | LD=g++ |
5 | PROFILE= | 5 | PROFILE= |
6 | CFLAGS=-g $(PROFILE) -std=c99 -Wall $(DEFINES) `pkg-config --cflags libcrypto++` | 6 | PKGCONFIG := $(CROSS)pkg-config |
7 | CXXFLAGS=-g $(PROFILE) -Wall $(DEFINES) `pkg-config --cflags libcrypto++` | 7 | |
8 | LDFLAGS=$(PROFILE) `pkg-config --libs libcrypto++` -lpthread | 8 | # Distros could use different names for the crypto library. We try a list |
9 | # of candidate names, only one of them should be the valid one. | ||
10 | LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ | ||
11 | |||
12 | $(foreach l,$(LIBCRYPTO_NAMES),\ | ||
13 | $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l)))) | ||
14 | $(foreach l,$(LIBCRYPTO_NAMES),\ | ||
15 | $(eval CFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) | ||
16 | $(foreach l,$(LIBCRYPTO_NAMES),\ | ||
17 | $(eval CXXFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) | ||
18 | |||
19 | CXXFLAGS=-g $(PROFILE) -Wall $(DEFINES) | ||
20 | CFLAGS=-g $(PROFILE) -Wall -std=c99 $(DEFINES) | ||
21 | LDFLAGS=$(PROFILE) $(LDOPTS) -lpthread | ||
22 | |||
9 | BINS=upgtool | 23 | BINS=upgtool |
10 | 24 | ||
11 | all: $(BINS) | 25 | all: $(BINS) |