summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/mkimxboot/Makefile33
-rw-r--r--rbutil/rbutilqt/Makefile.libs4
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro6
3 files changed, 23 insertions, 20 deletions
diff --git a/rbutil/mkimxboot/Makefile b/rbutil/mkimxboot/Makefile
index 9ad21a1966..d2c487c475 100644
--- a/rbutil/mkimxboot/Makefile
+++ b/rbutil/mkimxboot/Makefile
@@ -8,24 +8,18 @@
# 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
+COMPILEFLAGS := -Wall -g -O3 -I$(IMXTOOLS_DIR)
+
+# std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE)
+CFLAGS += -std=gnu99 $(COMPILEFLAGS)
+CXXFLAGS += $(COMPILEFLAGS)
-# 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++
+TOMCRYPT_DIR := ../../utils/tomcrypt
-$(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
+CXXFLAGS += -I$(TOMCRYPT_DIR)/src/headers
+CFLAGS += -I$(TOMCRYPT_DIR)/src/headers
+LDOPTS += -lpthread $(TOMCRYPT_DIR)/librbtomcrypt.a
OUTPUT = mkimxboot
@@ -33,6 +27,10 @@ OUTPUT = mkimxboot
IMXTOOLS_SOURCES = misc.c sb.c crypto.cpp crc.c elf.c
LIBSOURCES := dualboot.c mkimxboot.c md5.c \
$(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES))
+
+# for now build tomcrypt as part of the lib.
+LIBSOURCES += $(addprefix $(TOMCRYPT_DIR),$(TOMCRYPT_SOURCES))
+
# inputs for binary only
SOURCES := $(LIBSOURCES) main.c
# dependencies for binary
@@ -43,3 +41,8 @@ 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
+$(BINARY): librbtomcrypt.a
+
+librbtomcrypt.a:
+ $(MAKE) -C ../../utils/tomcrypt
+
diff --git a/rbutil/rbutilqt/Makefile.libs b/rbutil/rbutilqt/Makefile.libs
index 6d5c8c5354..938426f124 100644
--- a/rbutil/rbutilqt/Makefile.libs
+++ b/rbutil/rbutilqt/Makefile.libs
@@ -33,12 +33,14 @@ export CC=$(EXTRALIBS_CC)
export CXX=$(EXTRALIBS_CXX)
export AR=$(EXTRALIBS_AR)
-libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbzip2 libbspatch
+libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbzip2 libbspatch librbtomcrypt
# To support cross compiles, we explicitly pass the CC flag below for
# all tools which override CC or CXX in their makefiles. CXX is only
# used by mkimxboot.
+librbtomcrypt:
+ $(SILENT) $(MAKE) -C $(RBBASE_DIR)/utils/tomcrypt BUILD_DIR=$(BUILD_DIR)/tomcrypt librbtomcrypt.a
librbspeex:
$(SILENT) $(MAKE) -C $(RBBASE_DIR)/tools/rbspeex BUILD_DIR=$(BUILD_DIR)/libspeex librbspeex.a
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index d07c1e01bc..9d7da92dbf 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -85,7 +85,8 @@ extralibs.commands = $$SILENT \
# Note: order is important for RBLIBS! The libs are appended to the linker
# flags in this order, put libucl at the end.
RBLIBS = rbspeex ipodpatcher sansapatcher mkamsboot mktccboot \
- mkmpioboot chinachippatcher mkimxboot mks5lboot bspatch ucl
+ mkmpioboot chinachippatcher mkimxboot mks5lboot bspatch ucl \
+ rbtomcrypt
# NOTE: Linking bzip2 causes problems on Windows (Qt seems to export those
# symbols as well, similar to what we have with zlib.) Only link that on
# non-Windows for now.
@@ -139,9 +140,6 @@ for(rblib, RBLIBS) {
LIBS += -l$$rblib
}
-# We need libcrypto++
-LIBS += -lcryptopp
-
# on win32 libz is linked implicitly.
!win32 {
LIBS += -lz