summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-01-24 07:31:07 -0500
committerSolomon Peachy <pizza@shaftnet.org>2019-01-25 12:58:18 +0100
commit07084f62c40d3197f3a11ac4e5fbe3b923e9ae1e (patch)
tree89eaf3845056d5c4b0b8e86799f4bb6602e6ab03 /rbutil
parent96052373490095cd02fca7eb6ccdcfabe6403803 (diff)
downloadrockbox-07084f62c40d3197f3a11ac4e5fbe3b923e9ae1e.tar.gz
rockbox-07084f62c40d3197f3a11ac4e5fbe3b923e9ae1e.zip
Fix host build of mkimxboot, mknwzboot, nwztools, and rbutil with crypto++
Necessary to get working builds on my Fedora 29 system. Change-Id: Ia6232427c959629ade9a85fc412738f688facedb
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/mkimxboot/Makefile12
-rw-r--r--rbutil/mknwzboot/Makefile18
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro4
3 files changed, 29 insertions, 5 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
9IMXTOOLS_DIR=../../utils/imxtools/sbtools/ 10IMXTOOLS_DIR=../../utils/imxtools/sbtools/
10CFLAGS += -I$(IMXTOOLS_DIR) -Wall 11CFLAGS += -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)
12CFLAGS += -std=gnu99 -g -O3 13CFLAGS += -std=gnu99 -g -O3
13 14
15# Location to pkg-config binary.
16PKGCONFIG := 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.
16PKGCONFIG := $(CROSS)pkg-config
17LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ 20LIBCRYPTO_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))))
28LDOPTS += -lpthread
20 29
21OUTPUT = mkimxboot 30OUTPUT = 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
diff --git a/rbutil/mknwzboot/Makefile b/rbutil/mknwzboot/Makefile
index fd80106b83..3cbb2ef9dd 100644
--- a/rbutil/mknwzboot/Makefile
+++ b/rbutil/mknwzboot/Makefile
@@ -12,7 +12,21 @@ CFLAGS += -I$(UPGTOOLS_DIR) -Wall
12CFLAGS += -std=gnu99 -g -O3 12CFLAGS += -std=gnu99 -g -O3
13# dependencies 13# dependencies
14# FIXME make it work for windows and maybe embed crypto++ 14# FIXME make it work for windows and maybe embed crypto++
15LDOPTS += `pkg-config --libs libcrypto++` 15
16# Location to pkg-config binary.
17PKGCONFIG := pkg-config
18
19# Distros could use different names for the crypto library. We try a list
20# of candidate names, only one of them should be the valid one.
21LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++
22
23$(foreach l,$(LIBCRYPTO_NAMES),\
24 $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l))))
25$(foreach l,$(LIBCRYPTO_NAMES),\
26 $(eval CFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l))))
27$(foreach l,$(LIBCRYPTO_NAMES),\
28 $(eval CXXFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l))))
29LDOPTS += -lpthread
16 30
17OUTPUT = mknwzboot 31OUTPUT = mknwzboot
18 32
@@ -23,7 +37,7 @@ LIBSOURCES := mknwzboot.c install_script.c uninstall_script.c \
23# inputs for binary only 37# inputs for binary only
24SOURCES := $(LIBSOURCES) main.c 38SOURCES := $(LIBSOURCES) main.c
25# dependencies for binary 39# dependencies for binary
26EXTRADEPS := 40EXTRADEPS :=
27 41
28include ../libtools.make 42include ../libtools.make
29 43
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index 0b1f5fde54..745d9887b5 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -135,6 +135,9 @@ for(rblib, RBLIBS) {
135 LIBS += -l$$rblib 135 LIBS += -l$$rblib
136} 136}
137 137
138# We need libcrypto++
139LIBS += -lcryptopp
140
138# on win32 libz is linked implicitly. 141# on win32 libz is linked implicitly.
139!win32 { 142!win32 {
140 LIBS += -lz 143 LIBS += -lz
@@ -264,4 +267,3 @@ unix {
264include(rbutilqt.pri) 267include(rbutilqt.pri)
265include(quazip/quazip.pri) 268include(quazip/quazip.pri)
266include(logger/logger.pri) 269include(logger/logger.pri)
267