diff options
Diffstat (limited to 'rbutil/mkimxboot/Makefile')
-rw-r--r-- | rbutil/mkimxboot/Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rbutil/mkimxboot/Makefile b/rbutil/mkimxboot/Makefile index b584084811..9ad21a1966 100644 --- a/rbutil/mkimxboot/Makefile +++ b/rbutil/mkimxboot/Makefile | |||
@@ -6,17 +6,26 @@ | |||
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | 7 | ||
8 | # We use the SB code available in the Rockbox utils/sbtools directory | 8 | # We use the SB code available in the Rockbox utils/sbtools directory |
9 | |||
9 | IMXTOOLS_DIR=../../utils/imxtools/sbtools/ | 10 | IMXTOOLS_DIR=../../utils/imxtools/sbtools/ |
10 | CFLAGS += -I$(IMXTOOLS_DIR) -Wall | 11 | CFLAGS += -I$(IMXTOOLS_DIR) -Wall |
11 | # std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE) | 12 | # std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE) |
12 | CFLAGS += -std=gnu99 -g -O3 | 13 | CFLAGS += -std=gnu99 -g -O3 |
13 | 14 | ||
15 | # Location to pkg-config binary. | ||
16 | PKGCONFIG := pkg-config | ||
17 | |||
14 | # Distros could use different names for the crypto library. We try a list | 18 | # Distros could use different names for the crypto library. We try a list |
15 | # of candidate names, only one of them should be the valid one. | 19 | # of candidate names, only one of them should be the valid one. |
16 | PKGCONFIG := $(CROSS)pkg-config | ||
17 | LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ | 20 | LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ |
21 | |||
18 | $(foreach l,$(LIBCRYPTO_NAMES),\ | 22 | $(foreach l,$(LIBCRYPTO_NAMES),\ |
19 | $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l)))) | 23 | $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l)))) |
24 | $(foreach l,$(LIBCRYPTO_NAMES),\ | ||
25 | $(eval CFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) | ||
26 | $(foreach l,$(LIBCRYPTO_NAMES),\ | ||
27 | $(eval CXXFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) | ||
28 | LDOPTS += -lpthread | ||
20 | 29 | ||
21 | OUTPUT = mkimxboot | 30 | OUTPUT = mkimxboot |
22 | 31 | ||
@@ -34,4 +43,3 @@ include ../libtools.make | |||
34 | # explicit dependencies on dualboot.{c,h} and mkimxboot.h | 43 | # explicit dependencies on dualboot.{c,h} and mkimxboot.h |
35 | $(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h | 44 | $(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h |
36 | $(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h | 45 | $(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h |
37 | |||