Update Makefile for upx-lzma-sdk.
This commit is contained in:
+1
-11
@@ -72,13 +72,10 @@ INCLUDES += -I$(UPX_UCLDIR)/include
|
|||||||
LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
|
LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
|
||||||
endif
|
endif
|
||||||
LIBS += -lucl -lz
|
LIBS += -lucl -lz
|
||||||
# you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK
|
# LZMA from https://github.com/upx/upx-lzma-sdk
|
||||||
include $(top_srcdir)/src/stub/src/c/Makevars.lzma
|
include $(top_srcdir)/src/stub/src/c/Makevars.lzma
|
||||||
$(info UPX_LZMA_VERSION=$(UPX_LZMA_VERSION))
|
|
||||||
ifneq ($(UPX_LZMA_VERSION),)
|
|
||||||
DEFS += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
DEFS += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||||
INCLUDES += -I$(UPX_LZMADIR)
|
INCLUDES += -I$(UPX_LZMADIR)
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
all: upx$(exeext) | .depend
|
all: upx$(exeext) | .depend
|
||||||
@@ -103,14 +100,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
##compress_lzma$(objext) : CXXFLAGS += -O3 -fomit-frame-pointer
|
##compress_lzma$(objext) : CXXFLAGS += -O3 -fomit-frame-pointer
|
||||||
compress_lzma$(objext) : CXXFLAGS += -Wno-cast-qual
|
|
||||||
compress_lzma$(objext) : CXXFLAGS += -Wno-shadow
|
compress_lzma$(objext) : CXXFLAGS += -Wno-shadow
|
||||||
ifeq ($(UPX_LZMA_VERSION),0x443)
|
|
||||||
compress_lzma$(objext) : CXXFLAGS += -Wno-non-virtual-dtor
|
|
||||||
compress_lzma$(objext) : CXXFLAGS += -Wno-unused
|
|
||||||
endif
|
|
||||||
# needed for gcc-4.3:
|
|
||||||
compress_lzma$(objext) : CXXFLAGS += -Wno-error
|
|
||||||
p_mach$(objext) : CXXFLAGS += -Wno-cast-align
|
p_mach$(objext) : CXXFLAGS += -Wno-cast-align
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,14 @@
|
|||||||
# you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK lzma443.tar.bz2
|
# UPX unconditionally uses its own version in src/lzma-sdk because
|
||||||
# NOTE: only version 4.43 is currently sufficiently tested !
|
# that version works fine since 2006 and that is the only version
|
||||||
|
# that is actually sufficiently tested!!!
|
||||||
|
|
||||||
ifndef UPX_LZMADIR
|
override UPX_LZMADIR := $(top_srcdir)/src/lzma-sdk
|
||||||
ifdef top_srcdir
|
override UPX_LZMA_VERSION := 0x443
|
||||||
ifneq ($(wildcard $(top_srcdir)/src/stub/src/c/lzma-sdk/C/.),)
|
|
||||||
UPX_LZMADIR := $(top_srcdir)/src/stub/src/c/lzma-sdk
|
|
||||||
else ifneq ($(wildcard $(top_srcdir)/src/lzma-sdk/C/.),)
|
|
||||||
UPX_LZMADIR := $(top_srcdir)/src/lzma-sdk
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zVersion.h),)
|
ifeq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||||
UPX_LZMA_VERSION := $(shell perl -ne 'print "0x$$1$$2" if /^\s*\#\s*define\s+MY_VERSION\s+"(\d*)\.(\d\d)[\s\w]*"/;' $(UPX_LZMADIR)/C/7zVersion.h)
|
ifneq ($(wildcard $(top_srcdir)/.git/.),)
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/CPP/Windows/Time.cpp),)
|
$(error ERROR: missing git submodule; run 'git submodule update --init --recursive')
|
||||||
UPX_LZMA_VERSION = 0x459
|
else
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zBuf.h),)
|
$(error ERROR: missing directory src/lzma-sdk/; visit https://github.com/upx/upx-lzma-sdk )
|
||||||
UPX_LZMA_VERSION = 0x458
|
endif
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/C/CpuArch.h),)
|
|
||||||
UPX_LZMA_VERSION = 0x457
|
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/CPP/7zip/.),)
|
|
||||||
UPX_LZMA_VERSION = 0x449
|
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/Compress/LZ/Patricia/.),)
|
|
||||||
UPX_LZMA_VERSION = 0x442
|
|
||||||
else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
|
||||||
UPX_LZMA_VERSION = 0x443
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user