diff --git a/src/stub/src/arch/amd64/Makefile.extra b/src/stub/src/arch/amd64/Makefile.extra index 2515b48c..2be3d986 100644 --- a/src/stub/src/arch/amd64/Makefile.extra +++ b/src/stub/src/arch/amd64/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // amd64-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = amd64-lzma amd64-linux.elf default lzma_d_c%.S : tc_bfdname = elf64-x86-64 @@ -42,5 +46,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/arm/v4a/Makefile.extra b/src/stub/src/arch/arm/v4a/Makefile.extra index f2a9f572..7be18321 100644 --- a/src/stub/src/arch/arm/v4a/Makefile.extra +++ b/src/stub/src/arch/arm/v4a/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // arm-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = arm-lzma arm-linux.elf default lzma_d_c%.S : tc_bfdname = elf32-littlearm @@ -43,5 +47,3 @@ lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL lzma_d_cf.% : LABEL_PREFIX = .Lf lzma_d_cs.% : LABEL_PREFIX = .Ls - -endif diff --git a/src/stub/src/arch/arm/v4a/lzma_d_c.c b/src/stub/src/arch/arm/v4a/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/arm/v4a/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/arm/v4t/Makefile.extra b/src/stub/src/arch/arm/v4t/Makefile.extra index 531f3d4e..b4470c6a 100644 --- a/src/stub/src/arch/arm/v4t/Makefile.extra +++ b/src/stub/src/arch/arm/v4t/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // arm-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = arm-lzma arm-linux.elf default lzma_d_c%.S : tc_bfdname = elf32-littlearm @@ -41,5 +45,3 @@ lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL lzma_d_cf.% : LABEL_PREFIX = .Lf lzma_d_cs.% : LABEL_PREFIX = .Ls - -endif diff --git a/src/stub/src/arch/arm/v4t/lzma_d_c.c b/src/stub/src/arch/arm/v4t/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/arm/v4t/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/i386/Makefile.extra b/src/stub/src/arch/i386/Makefile.extra index a7480eb0..6bdcf868 100644 --- a/src/stub/src/arch/i386/Makefile.extra +++ b/src/stub/src/arch/i386/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // i386-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = i386-lzma i386-linux.elf arch-i386 default lzma_d_c%.S : tc_bfdname = elf32-i386 @@ -41,5 +45,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/i386/lzma_d_c.c b/src/stub/src/arch/i386/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/i386/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/m68k/m68000/Makefile.extra b/src/stub/src/arch/m68k/m68000/Makefile.extra index fe7a1989..36ff7197 100644 --- a/src/stub/src/arch/m68k/m68000/Makefile.extra +++ b/src/stub/src/arch/m68k/m68000/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // m68k-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = m68k-lzma default lzma_d_c%.S : tc_bfdname = elf32-m68k @@ -44,5 +48,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/m68k/m68000/lzma_d_c.c b/src/stub/src/arch/m68k/m68000/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/m68k/m68000/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/m68k/m68020/Makefile.extra b/src/stub/src/arch/m68k/m68020/Makefile.extra index 074a180f..56641475 100644 --- a/src/stub/src/arch/m68k/m68020/Makefile.extra +++ b/src/stub/src/arch/m68k/m68020/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // m68k-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = m68k-lzma default lzma_d_c%.S : tc_bfdname = elf32-m68k @@ -43,5 +47,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/m68k/m68020/lzma_d_c.c b/src/stub/src/arch/m68k/m68020/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/m68k/m68020/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra b/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra index c73c255d..8382dd70 100644 --- a/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra +++ b/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // mipsel.r3000-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = mipsel-lzma mipsel.r3000-ps1 default lzma_d_c%.S : tc_bfdname = elf32-littlemips @@ -43,5 +47,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/mips/mipsel.r3000/lzma_d_c.c b/src/stub/src/arch/mips/mipsel.r3000/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/mips/mipsel.r3000/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/powerpc/32/Makefile.extra b/src/stub/src/arch/powerpc/32/Makefile.extra index 6bbb8c44..88565247 100644 --- a/src/stub/src/arch/powerpc/32/Makefile.extra +++ b/src/stub/src/arch/powerpc/32/Makefile.extra @@ -8,21 +8,25 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../.. __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) endif +vpath %.c $(top_srcdir)/src/stub/src/c + +STUBS = +ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) +STUBS += lzma_d_cf.S lzma_d_cs.S +endif default.targets = all +ifeq ($(strip $(STUBS)),) STUBS = NO_STUBS +all.targets = +endif include $(top_srcdir)/src/stub/Makefile -STUBS = # /*********************************************************************** # // powerpc-lzma # ************************************************************************/ -ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) - -STUBS += lzma_d_cf.S lzma_d_cs.S - lzma_d_c%.S : tc_list = powerpc-lzma powerpc-linux.elf default lzma_d_c%.S : tc_bfdname = elf32-powerpc @@ -43,5 +47,3 @@ lzma_d_c%.S : lzma_d_c.c lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL - -endif diff --git a/src/stub/src/arch/powerpc/32/lzma_d_c.c b/src/stub/src/arch/powerpc/32/lzma_d_c.c deleted file mode 100644 index 9d2c2c96..00000000 --- a/src/stub/src/arch/powerpc/32/lzma_d_c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* lzma_d.c -- - - This file is part of the UPX executable compressor. - - Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - */ - - -/************************************************************************* -// -**************************************************************************/ - -#define ACC_LIBC_NAKED -#define ACC_OS_FREESTANDING -#include "miniacc.h" - -#undef _LZMA_IN_CB -#undef _LZMA_OUT_READ -#undef _LZMA_PROB32 -#undef _LZMA_LOC_OPT - -#if 0 - -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) - -#else - -#define CLzmaDecoderState CLzmaDecoderState_dummy -#define LzmaDecode LzmaDecode_dummy -#include "C/7zip/Compress/LZMA_C/LzmaDecode.h" -#undef CLzmaDecoderState -#undef LzmaDecode -typedef struct { - struct { unsigned char lc, lp, pb, dummy; } Properties; - CProb Probs[6]; -// CProb *Probs; -} CLzmaDecoderState; -ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16) -#define CLzmaDecoderState const CLzmaDecoderState -#include "C/7zip/Compress/LZMA_C/LzmaDecode.c" - -#endif - - -/* -vi:ts=4:et:nowrap -*/ - diff --git a/src/stub/src/arch/amd64/lzma_d_c.c b/src/stub/src/c/lzma_d_c.c similarity index 100% rename from src/stub/src/arch/amd64/lzma_d_c.c rename to src/stub/src/c/lzma_d_c.c