diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2019-01-24 07:31:07 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2019-01-25 12:58:18 +0100 |
commit | 07084f62c40d3197f3a11ac4e5fbe3b923e9ae1e (patch) | |
tree | 89eaf3845056d5c4b0b8e86799f4bb6602e6ab03 /rbutil | |
parent | 96052373490095cd02fca7eb6ccdcfabe6403803 (diff) |
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/Makefile | 12 | ||||
-rw-r--r-- | rbutil/mknwzboot/Makefile | 18 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 4 |
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 @@ # \/ \/ \/ \/ \/ # We use the SB code available in the Rockbox utils/sbtools directory + IMXTOOLS_DIR=../../utils/imxtools/sbtools/ CFLAGS += -I$(IMXTOOLS_DIR) -Wall # std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE) CFLAGS += -std=gnu99 -g -O3 +# Location to pkg-config binary. +PKGCONFIG := pkg-config + # Distros could use different names for the crypto library. We try a list # of candidate names, only one of them should be the valid one. -PKGCONFIG := $(CROSS)pkg-config LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ + $(foreach l,$(LIBCRYPTO_NAMES),\ $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l)))) +$(foreach l,$(LIBCRYPTO_NAMES),\ + $(eval CFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) +$(foreach l,$(LIBCRYPTO_NAMES),\ + $(eval CXXFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) +LDOPTS += -lpthread OUTPUT = mkimxboot @@ -34,4 +43,3 @@ include ../libtools.make # explicit dependencies on dualboot.{c,h} and mkimxboot.h $(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h $(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h - 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 CFLAGS += -std=gnu99 -g -O3 # dependencies # FIXME make it work for windows and maybe embed crypto++ -LDOPTS += `pkg-config --libs libcrypto++` + +# Location to pkg-config binary. +PKGCONFIG := pkg-config + +# Distros could use different names for the crypto library. We try a list +# of candidate names, only one of them should be the valid one. +LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++ + +$(foreach l,$(LIBCRYPTO_NAMES),\ + $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l)))) +$(foreach l,$(LIBCRYPTO_NAMES),\ + $(eval CFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) +$(foreach l,$(LIBCRYPTO_NAMES),\ + $(eval CXXFLAGS += $(shell $(PKGCONFIG) --silence-errors --cflags $(l)))) +LDOPTS += -lpthread OUTPUT = mknwzboot @@ -23,7 +37,7 @@ LIBSOURCES := mknwzboot.c install_script.c uninstall_script.c \ # inputs for binary only SOURCES := $(LIBSOURCES) main.c # dependencies for binary -EXTRADEPS := +EXTRADEPS := include ../libtools.make 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) { LIBS += -l$$rblib } +# We need libcrypto++ +LIBS += -lcryptopp + # on win32 libz is linked implicitly. !win32 { LIBS += -lz @@ -264,4 +267,3 @@ unix { include(rbutilqt.pri) include(quazip/quazip.pri) include(logger/logger.pri) - |