Added support for LZMA SDK 4.49. Compiles, but pretty much untested.
This commit is contained in:
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -37,6 +38,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -40,6 +41,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -38,6 +39,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#
|
||||
# highly experimental support for i086 using Open Watcom C/C++
|
||||
#
|
||||
##export WATCOM ?= /opt/cc-i386-linux/watcom/open-watcom-1.6
|
||||
#
|
||||
|
||||
MAKEFLAGS += -rR
|
||||
.SUFFIXES:
|
||||
.SECONDEXPANSION:
|
||||
@@ -18,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
ifneq ($(wildcard $(WATCOM)/binl/wcl),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
@@ -94,6 +89,7 @@ lzma_d_c% : tc_bfdname =
|
||||
c := tc.arch-i086.gcc
|
||||
$c += -MF /dev/null
|
||||
$c += -Wall -W
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
@@ -105,7 +101,12 @@ $c += -ms
|
||||
$c += -O1 -1
|
||||
$c += -w
|
||||
$c += -D__INT_MAX__=32767
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
ifeq ($(UPX_LZMA_VERSION),0x449)
|
||||
$c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/Compress/Lzma))
|
||||
else
|
||||
$c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/7zip/Compress/LZMA_C))
|
||||
endif
|
||||
$c += -I$(top_srcdir)/src
|
||||
endif
|
||||
|
||||
@@ -113,14 +114,16 @@ endif
|
||||
# http://www.digitalmars.com/download/freecompiler.html
|
||||
ifneq ($(wildcard $(DM849DIR)/bin/dmc.exe),)
|
||||
c := tc.method-lzma.dmc
|
||||
$c = $(WINEENV) CFLAGS='$(DMC)' wine cmd.exe /c tmp/dmc.bat
|
||||
$c = $(WINEENV) DMC1='$(DMC1)' DMC2='$(DMC2)' wine cmd.exe /c tmp/dmc.bat
|
||||
$c += -ms -R
|
||||
$c += -NS
|
||||
$c += -w- -w7 -r
|
||||
DMC := -o -0
|
||||
DMC += -D__INT_MAX__=32767
|
||||
DMC += -I$(call winedir_w,$(UPX_LZMADIR))
|
||||
DMC += -I$(call winedir_w,$(top_srcdir)/src)
|
||||
$c += @DMC1 @DMC2
|
||||
DMC1 := -o -0
|
||||
DMC1 += -D__INT_MAX__=32767
|
||||
DMC1 += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
DMC2 := -I$(call winedir_w,$(UPX_LZMADIR))
|
||||
DMC2 += -I$(call winedir_w,$(top_srcdir)/src)
|
||||
endif
|
||||
|
||||
# Visual C/C++ 1.52 (8.00c)
|
||||
@@ -133,6 +136,7 @@ $c += -O2 -Gf -Gs -G0
|
||||
$c += -W4
|
||||
CL := -nologo
|
||||
CL += -D__INT_MAX__=32767
|
||||
CL += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
CL += -I$(call winedir_s,$(UPX_LZMADIR))
|
||||
CL += -I$(call winedir_s,$(top_srcdir)/src)
|
||||
endif
|
||||
@@ -147,12 +151,13 @@ $c += -zm -zc
|
||||
$c += -os -s -0 -d0
|
||||
$c += -w5 -we -fr=/dev/null
|
||||
$c += -D__INT_MAX__=32767
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
ifneq ($(wildcard $(WATCOM)/binl/wcl),)
|
||||
|
||||
lzma_d_c%.S : tmp/lzma_d_c%.i cleanasm.py $(MAKEFILE_LIST)
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -36,6 +37,7 @@ $c = $(tc.i386-linux.elf.gcc)
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -38,6 +39,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -38,6 +39,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -69,7 +70,8 @@ $c += -ffixed-30
|
||||
else
|
||||
$(error unknown gcc version: $(firstword $($c)))
|
||||
endif
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
endif
|
||||
$c += -I$(top_srcdir)/src
|
||||
@@ -100,7 +102,7 @@ define __test_stub_compression
|
||||
@ls -l $1.tmp.*
|
||||
endef
|
||||
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
test-stub-compression: tc_list = mipsel.r3000-ps1 default
|
||||
test-stub-compression: lzma_d_cf.S lzma_d_cs.S
|
||||
$(call __test_stub_compression,tmp/lzma_d_cs.out,tmp/lzma_d_cs.o)
|
||||
|
||||
@@ -12,7 +12,8 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
|
||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||
|
||||
STUBS =
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
include $(top_srcdir)/src/stub/src/c/Makedefs.lzma
|
||||
ifneq ($(UPX_LZMA_VERSION),)
|
||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
||||
endif
|
||||
|
||||
@@ -38,6 +39,7 @@ $c += -Os -fomit-frame-pointer
|
||||
$c += -fno-unit-at-a-time
|
||||
$c += -ffunction-sections
|
||||
$c += -fwrapv
|
||||
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
|
||||
$c += -I$(UPX_LZMADIR)
|
||||
$c += -I$(top_srcdir)/src
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK
|
||||
ifneq ($(wildcard $(UPX_LZMADIR)/CPP/7zip/.),)
|
||||
UPX_LZMA_VERSION = 0x449
|
||||
else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||
UPX_LZMA_VERSION = 0x443
|
||||
endif
|
||||
@@ -48,6 +48,9 @@
|
||||
# define _LZMA_UINT32_IS_ULONG 1
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(_LZMA_NO_SYSTEM_SIZE_T)
|
||||
# define _LZMA_NO_SYSTEM_SIZE_T 1
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -66,7 +69,11 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16)
|
||||
#if (ACC_CC_BORLANDC)
|
||||
#include "LzmaDecode.h"
|
||||
#else
|
||||
#include "C/7zip/Compress/LZMA_C/LzmaDecode.h"
|
||||
#if (WITH_LZMA >= 0x449)
|
||||
# include "C/Compress/Lzma/LzmaDecode.h"
|
||||
#else
|
||||
# include "C/7zip/Compress/LZMA_C/LzmaDecode.h"
|
||||
#endif
|
||||
#endif
|
||||
#undef CLzmaDecoderState
|
||||
#undef LzmaDecodeProperties
|
||||
@@ -93,7 +100,11 @@ int LzmaDecode(CLzmaDecoderState *, const unsigned char *, SizeT, SizeT *, unsig
|
||||
#if (ACC_CC_BORLANDC)
|
||||
#include "LzmaDecode.c"
|
||||
#else
|
||||
#include "C/7zip/Compress/LZMA_C/LzmaDecode.c"
|
||||
#if (WITH_LZMA >= 0x449)
|
||||
# include "C/Compress/Lzma/LzmaDecode.c"
|
||||
#else
|
||||
# include "C/7zip/Compress/LZMA_C/LzmaDecode.c"
|
||||
#endif
|
||||
#endif
|
||||
#undef char
|
||||
#undef CLzmaDecoderState
|
||||
|
||||
Reference in New Issue
Block a user