2037b837f8
Replace the use of crypto++ with tomcrypt, which is much smaller and C. This gets rid of various build issues for systems that don't ship crypo++ (i.e. everything except Linux.) Change-Id: Ic0799e17b94935c71b14765cf9a2a7ea2b0adc7a
78 lines
3 KiB
Makefile
78 lines
3 KiB
Makefile
# __________ __ ___.
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
# \/ \/ \/ \/ \/
|
|
#
|
|
|
|
ifndef V
|
|
SILENT = @
|
|
endif
|
|
|
|
TARGET_DIR ?= $(abspath .)/build/
|
|
BUILD_DIR ?= $(abspath .)/build/
|
|
# allow using this Makefile directly. Otherwise those variables are set via
|
|
# the generated one.
|
|
ifndef RBBASE_DIR
|
|
RBBASE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))/../../
|
|
endif
|
|
EXTRALIBS_CC ?= gcc
|
|
EXTRALIBS_AR ?= ar
|
|
|
|
# re-export variables that might have been set via command line.
|
|
# If set via command line sub-makefiles cannot override them, so use different
|
|
# variable names in the calling makefile.
|
|
export APPVERSION=\"rbutil\"
|
|
export SYS_SPEEX
|
|
export TARGET_DIR
|
|
export RBBASE_DIR
|
|
export CFLAGS=$(EXTRALIB_CFLAGS)
|
|
export CXXFLAGS=$(EXTRALIB_CXXFLAGS)
|
|
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 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
|
|
|
|
libucl:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/tools/ucl/src BUILD_DIR=$(BUILD_DIR)/ucl libucl.a
|
|
|
|
libipodpatcher:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/ipodpatcher BUILD_DIR=$(BUILD_DIR)/ipodpatcher libipodpatcher.a CC=$(CC)
|
|
|
|
libsansapatcher:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/sansapatcher BUILD_DIR=$(BUILD_DIR)/sansapatcher libsansapatcher.a CC=$(CC)
|
|
|
|
libmkamsboot:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkamsboot BUILD_DIR=$(BUILD_DIR)/mkamsboot libmkamsboot.a CC=$(CC)
|
|
|
|
libmktccboot:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mktccboot BUILD_DIR=$(BUILD_DIR)/mktccboot libmktccboot.a CC=$(CC)
|
|
|
|
libmkmpioboot:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkmpioboot BUILD_DIR=$(BUILD_DIR)/mkmpioboot libmkmpioboot.a CC=$(CC)
|
|
|
|
libchinachippatcher:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/chinachippatcher BUILD_DIR=$(BUILD_DIR)/chinachippatcher libchinachippatcher.a CC=$(CC)
|
|
|
|
libmkimxboot:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkimxboot BUILD_DIR=$(BUILD_DIR)/mkimxboot libmkimxboot.a CC=$(CC) CXX=$(CXX)
|
|
|
|
libmks5lboot:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mks5lboot BUILD_DIR=$(BUILD_DIR)/mks5lboot libmks5lboot.a CC=$(CC)
|
|
|
|
libbzip2:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/bzip2 BUILD_DIR=$(BUILD_DIR)/bzip2 libbzip2.a CC=$(CC)
|
|
|
|
libbspatch:
|
|
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/bspatch BUILD_DIR=$(BUILD_DIR)/bspatch libbspatch.a CC=$(CC)
|