client: replace zlib by bzip2

This commit is contained in:
Philippe Teuwen
2020-06-08 02:50:43 +02:00
parent 8418e89180
commit 15012198f9
712 changed files with 32 additions and 217 deletions
+1
View File
@@ -29,6 +29,7 @@ addons:
- libnewlib-dev
- libbluetooth-dev
- python3-dev
- libbz2-dev
homebrew:
packages:
- readline
+1 -1
View File
@@ -288,6 +288,7 @@ find_library(pm3rrg_rdv4_hardnested REQUIRED)
find_library(pm3rrg_rdv4_whereami REQUIRED)
target_link_libraries(proxmark3 PRIVATE
bz2
readline
pthread
m
@@ -298,7 +299,6 @@ target_link_libraries(proxmark3 PRIVATE
pm3rrg_rdv4_tinycbor
pm3rrg_rdv4_amiibo
pm3rrg_rdv4_reveng
pm3rrg_rdv4_z
pm3rrg_rdv4_hardnested
pm3rrg_rdv4_whereami
${ADDITIONAL_LNK})
+5 -38
View File
@@ -85,11 +85,6 @@ MBEDTLSLIBPATH = ../common/mbedtls
MBEDTLSLIBINC = -I$(MBEDTLSLIBPATH)
MBEDTLSLIB = $(OBJDIR)/libmbedtls.a
## Zlib
ZLIBPATH = ../common/zlib
ZLIBINC = -I$(ZLIBPATH)
ZLIB = $(OBJDIR)/libz.a
########################################################
# optional system libraries to replace local libraries #
########################################################
@@ -161,20 +156,6 @@ endif
LDLIBS += $(WHEREAMILIB)
INCLUDES += $(WHEREAMILIBINC)
## Zlib
# system library useable? Need to recompress hardnested tables?
ifneq ($(SKIPZLIBSYSTEM),1)
ZLIBINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags zlib 2>/dev/null)
ZLIBLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs zlib 2>/dev/null)
ifneq ($(ZLIBLDLIBS),)
ZLIB = $(ZLIBLDLIBS)
ZLIBINC = $(ZLIBINCLUDES)
ZLIB_FOUND = 1
endif
endif
LDLIBS +=$(ZLIB)
INCLUDES += $(ZLIBINC)
####################
# system libraries #
####################
@@ -187,6 +168,9 @@ ifneq ($(platform),Darwin)
LDLIBS += -Wl,--as-needed -latomic -Wl,--no-as-needed
endif
## BZIP2
LDLIBS += -lbz2
## Bluez (optional)
ifneq ($(SKIPBT),1)
BTINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags bluez 2>/dev/null)
@@ -392,16 +376,6 @@ else
endif
endif
ifeq ($(SKIPZLIBSYSTEM),1)
$(info Zlib library: local library forced)
else
ifeq ($(ZLIB_FOUND),1)
$(info Zlib library: system library found)
else
$(info Zlib library: system library not found, using local library)
endif
endif
$(info compiler version: $(shell $(CC) --version|head -n 1))
$(info ===================================================================)
@@ -585,7 +559,7 @@ all: $(BINS)
all-static: LDLIBS:=-static $(LDLIBS)
all-static: $(BINS)
proxmark3: $(OBJS) amiibo cliparser jansson hardnested lua mbedtls reveng tinycbor whereami zlib lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua
proxmark3: $(OBJS) amiibo cliparser jansson hardnested lua mbedtls reveng tinycbor whereami lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua
$(info [=] LD $@)
$(Q)$(LD) $(PM3LDFLAGS) $(OBJS) $(LDLIBS) -o $@
@@ -620,7 +594,6 @@ clean:
$(Q)$(MAKE) --no-print-directory -C $(WHEREAMILIBPATH) clean
@# Just in case someone compiled within these dirs:
$(Q)$(MAKE) --no-print-directory -C $(MBEDTLSLIBPATH) clean
$(Q)$(MAKE) --no-print-directory -C $(ZLIBPATH) clean
install: all
$(info [@] Installing client to $(DESTDIR)$(PREFIX)...)
@@ -694,17 +667,11 @@ ifneq ($(WHEREAMI_FOUND),1)
$(Q)$(MAKE) --no-print-directory -C $(WHEREAMILIBPATH) all
endif
zlib:
ifneq ($(ZLIB_FOUND),1)
$(info [*] MAKE $@)
$(Q)$(MAKE) --no-print-directory -C $(ZLIBPATH) OBJDIR=$(ROOT_DIR)$(OBJDIR) BINDIR=$(ROOT_DIR)$(OBJDIR) all
endif
########
# misc #
########
.PHONY: all clean install uninstall tarbin amiibo cliparser hardnested jansson lua mbedtls reveng tinycbor whereami zlib
.PHONY: all clean install uninstall tarbin amiibo cliparser hardnested jansson lua mbedtls reveng tinycbor whereami
# version.c should be remade on every compilation
src/version.c: default_version.c
-3
View File
@@ -25,6 +25,3 @@ endif()
if (NOT TARGET pm3rrg_rdv4_whereami)
include(whereami.cmake)
endif()
if (NOT TARGET pm3rrg_rdv4_z)
include(zlib.cmake)
endif()
-14
View File
@@ -1,14 +0,0 @@
add_library(pm3rrg_rdv4_z STATIC
../../common/zlib/deflate.c
../../common/zlib/adler32.c
../../common/zlib/trees.c
../../common/zlib/zutil.c
../../common/zlib/inflate.c
../../common/zlib/inffast.c
../../common/zlib/inftrees.c
)
target_compile_definitions(pm3rrg_rdv4_z PRIVATE Z_SOLO NO_GZIP ZLIB_PM3_TUNED)
target_include_directories(pm3rrg_rdv4_z INTERFACE ../../common/zlib)
target_compile_options(pm3rrg_rdv4_z PRIVATE -Wall -Werror -O3)
set_property(TARGET pm3rrg_rdv4_z PROPERTY POSITION_INDEPENDENT_CODE ON)

Some files were not shown because too many files have changed in this diff Show More