mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Small Watcom updates.
This commit is contained in:
parent
6e5f5732b5
commit
78364ac830
|
@ -23,7 +23,7 @@ endif
|
||||||
-include $(top_srcdir)/Makevars.global ./Makevars.local
|
-include $(top_srcdir)/Makevars.global ./Makevars.local
|
||||||
vpath %.c $(top_srcdir)/src/stub/src/c
|
vpath %.c $(top_srcdir)/src/stub/src/c
|
||||||
|
|
||||||
export WATCOM ?= /opt/cc-i386-linux/watcom/open-watcom-1.6
|
##export WATCOM ?= /opt/cc-i386-linux/watcom/open-watcom-1.6
|
||||||
|
|
||||||
STUBS =
|
STUBS =
|
||||||
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
|
||||||
|
@ -48,17 +48,19 @@ lzma_d_c%.S : tc_list = method-lzma default
|
||||||
lzma_d_c%.S : tc_bfdname =
|
lzma_d_c%.S : tc_bfdname =
|
||||||
|
|
||||||
c := tc.method-lzma.wcc
|
c := tc.method-lzma.wcc
|
||||||
$c = $(WATCOM)/binl/wcc -zq -0
|
$c = $(WATCOM)/binl/wcc -zq -bt=dos -0
|
||||||
$c += -mh
|
$c += -mc
|
||||||
$c += -zm -zc
|
$c += -zm -zc
|
||||||
$c += -os -s -d0
|
$c += -os -s -d0
|
||||||
$c += -w5 -we -fr=/dev/null
|
$c += -w5 -we -fr=/dev/null
|
||||||
|
$c += -D__INT_MAX__=32767
|
||||||
$c += -D_LZMA_UINT32_IS_ULONG=1
|
$c += -D_LZMA_UINT32_IS_ULONG=1
|
||||||
$c += -I$(UPX_LZMADIR)
|
$c += -I$(UPX_LZMADIR)
|
||||||
$c += -I$(top_srcdir)/src
|
$c += -I$(top_srcdir)/src
|
||||||
|
|
||||||
tc.method-lzma.wdis = $(WATCOM)/binl/wdis
|
tc.method-lzma.dmpobj = $(WATCOM)/binl/dmpobj
|
||||||
tc.method-lzma.wdump = $(WATCOM)/binl/wdump
|
tc.method-lzma.wdis = $(WATCOM)/binl/wdis
|
||||||
|
tc.method-lzma.wdump = $(WATCOM)/binl/wdump
|
||||||
|
|
||||||
lzma_d_c%.S : lzma_d_c.c
|
lzma_d_c%.S : lzma_d_c.c
|
||||||
$(call tc,wcc) $(PP_FLAGS) -fo=tmp/$T.obj $<
|
$(call tc,wcc) $(PP_FLAGS) -fo=tmp/$T.obj $<
|
||||||
|
@ -73,3 +75,5 @@ FIXME:
|
||||||
|
|
||||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||||
lzma_d_cs.% : PP_FLAGS = -DSMALL
|
lzma_d_cs.% : PP_FLAGS = -DSMALL
|
||||||
|
lzma_d_cf.% : LABEL_PREFIX = .Lf
|
||||||
|
lzma_d_cs.% : LABEL_PREFIX = .Ls
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#define ACC_LIBC_NAKED 1
|
#define ACC_LIBC_NAKED 1
|
||||||
#define ACC_OS_FREESTANDING 1
|
/*#define ACC_OS_FREESTANDING 1*/
|
||||||
#include "miniacc.h"
|
#include "miniacc.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -39,6 +39,10 @@
|
||||||
#undef _LZMA_PROB32
|
#undef _LZMA_PROB32
|
||||||
#undef _LZMA_LOC_OPT
|
#undef _LZMA_LOC_OPT
|
||||||
#endif
|
#endif
|
||||||
|
#if (ACC_ARCH_I086) && (ACC_CC_WATCOMC)
|
||||||
|
typedef unsigned char __huge Byte;
|
||||||
|
# define _7ZIP_BYTE_DEFINED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
|
@ -51,10 +55,12 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define CLzmaDecoderState CLzmaDecoderState_dummy
|
#define CLzmaDecoderState CLzmaDecoderState_dummy
|
||||||
#define LzmaDecode LzmaDecode_dummy
|
#define LzmaDecodeProperties LzmaDecodeProperties_dummy
|
||||||
|
#define LzmaDecode LzmaDecode_dummy
|
||||||
#include "C/7zip/Compress/LZMA_C/LzmaDecode.h"
|
#include "C/7zip/Compress/LZMA_C/LzmaDecode.h"
|
||||||
#undef CLzmaDecoderState
|
#undef CLzmaDecoderState
|
||||||
|
#undef LzmaDecodeProperties
|
||||||
#undef LzmaDecode
|
#undef LzmaDecode
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct { unsigned char lc, lp, pb, dummy; } Properties;
|
struct { unsigned char lc, lp, pb, dummy; } Properties;
|
||||||
|
@ -65,8 +71,16 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
} CLzmaDecoderState;
|
} CLzmaDecoderState;
|
||||||
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 32768)
|
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 32768)
|
||||||
|
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(SizeT) >= 4)
|
||||||
|
|
||||||
#if defined(__WATCOMC__)
|
#if (ACC_ARCH_I086) && (ACC_CC_WATCOMC)
|
||||||
|
# if (ACC_MM_HUGE)
|
||||||
|
typedef unsigned short __far MyCProb;
|
||||||
|
# undef CProb
|
||||||
|
# define CProb MyCProb
|
||||||
|
# endif
|
||||||
|
# define char char __huge
|
||||||
|
#elif (ACC_CC_WATCOMC)
|
||||||
#else
|
#else
|
||||||
#define CLzmaDecoderState const CLzmaDecoderState
|
#define CLzmaDecoderState const CLzmaDecoderState
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user