CLeanups.
committer: mfx <mfx> 1042480204 +0000
This commit is contained in:
+10
-2
@@ -1,9 +1,14 @@
|
|||||||
|
ifeq ($(USE_GCC_DEPS),1)
|
||||||
|
ifeq ($(DEPS_DONE),)
|
||||||
|
DEPS_DONE = 1
|
||||||
|
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
# // automated dependencies
|
# // gcc automated dependencies
|
||||||
# ************************************************************************/
|
# ************************************************************************/
|
||||||
|
|
||||||
CFLAGS += -Wp,-MMD,.deps/$(*F).pp
|
EXTRA_CFLAGS += -Wp,-MMD,.deps/$(*F).pp
|
||||||
|
EXTRA_CXXFLAGS += -Wp,-MMD,.deps/$(*F).pp
|
||||||
|
|
||||||
ifeq ($(strip $(wildcard .deps)),)
|
ifeq ($(strip $(wildcard .deps)),)
|
||||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||||
@@ -14,3 +19,6 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
USE_GCC_DEPS := 1
|
||||||
|
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
# // defaults for gcc
|
# // defaults for gcc
|
||||||
|
|||||||
+2
-2
@@ -212,7 +212,7 @@ endif # linux
|
|||||||
ifeq ($(target),cross-m68k-linux)
|
ifeq ($(target),cross-m68k-linux)
|
||||||
include $(srcdir)/Makedefs.gcc
|
include $(srcdir)/Makedefs.gcc
|
||||||
CC = m68k-linux-gcc
|
CC = m68k-linux-gcc
|
||||||
CC = m68k-linux-g++
|
CXX = m68k-linux-g++
|
||||||
DEFS += '-DUPX_CONFIG_H="config_h/linux.h"'
|
DEFS += '-DUPX_CONFIG_H="config_h/linux.h"'
|
||||||
##LDLIBS += -lmcheck
|
##LDLIBS += -lmcheck
|
||||||
endif # cross-m68k-linux
|
endif # cross-m68k-linux
|
||||||
@@ -568,6 +568,6 @@ endif
|
|||||||
# // dependencies
|
# // dependencies
|
||||||
# ************************************************************************/
|
# ************************************************************************/
|
||||||
|
|
||||||
include $(srcdir)/Makedefs.dep
|
-include $(srcdir)/Makedefs.dep
|
||||||
|
|
||||||
# vi:nowrap
|
# vi:nowrap
|
||||||
|
|||||||
+1
-1
@@ -411,7 +411,7 @@ typedef RETSIGTYPE (SIGTYPEENTRY *sig_type)(int);
|
|||||||
# define UNUSED(parm) (parm = parm)
|
# define UNUSED(parm) (parm = parm)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HIGH(array) ((unsigned) (sizeof(array)/sizeof((array)[0])))
|
#define TABLESIZE(table) ((sizeof(table)/sizeof((table)[0])))
|
||||||
|
|
||||||
#define ALIGN_DOWN(a,b) (((a) / (b)) * (b))
|
#define ALIGN_DOWN(a,b) (((a) / (b)) * (b))
|
||||||
#define ALIGN_UP(a,b) ALIGN_DOWN((a) + ((b) - 1), b)
|
#define ALIGN_UP(a,b) ALIGN_DOWN((a) + ((b) - 1), b)
|
||||||
|
|||||||
+1
-1
@@ -232,7 +232,7 @@ const FilterImp::FilterEntry FilterImp::filters[] = {
|
|||||||
{ 0xb3,99, 0, f_sub32_4, u_sub32_4, s_sub32_4 },
|
{ 0xb3,99, 0, f_sub32_4, u_sub32_4, s_sub32_4 },
|
||||||
};
|
};
|
||||||
|
|
||||||
const int FilterImp::n_filters = HIGH(filters);
|
const int FilterImp::n_filters = TABLESIZE(filters);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ void init_options(struct options_t *o)
|
|||||||
o->w32pe.compress_exports = 1;
|
o->w32pe.compress_exports = 1;
|
||||||
o->w32pe.compress_icons = 2;
|
o->w32pe.compress_icons = 2;
|
||||||
o->w32pe.compress_resources = -1;
|
o->w32pe.compress_resources = -1;
|
||||||
for (unsigned i = 0; i < HIGH(opt->w32pe.compress_rt); i++)
|
for (unsigned i = 0; i < TABLESIZE(opt->w32pe.compress_rt); i++)
|
||||||
opt->w32pe.compress_rt[i] = -1;
|
opt->w32pe.compress_rt[i] = -1;
|
||||||
opt->w32pe.compress_rt[24] = false; // 24 == RT_MANIFEST
|
opt->w32pe.compress_rt[24] = false; // 24 == RT_MANIFEST
|
||||||
o->w32pe.strip_relocs = -1;
|
o->w32pe.strip_relocs = -1;
|
||||||
|
|||||||
+2
-2
@@ -88,7 +88,7 @@ PackW32Pe::PackW32Pe(InputFile *f) : super(f)
|
|||||||
//printf("pe_section_t %d\n", (int) sizeof(pe_section_t));
|
//printf("pe_section_t %d\n", (int) sizeof(pe_section_t));
|
||||||
COMPILE_TIME_ASSERT(sizeof(pe_header_t) == 248);
|
COMPILE_TIME_ASSERT(sizeof(pe_header_t) == 248);
|
||||||
COMPILE_TIME_ASSERT(sizeof(pe_section_t) == 40);
|
COMPILE_TIME_ASSERT(sizeof(pe_section_t) == 40);
|
||||||
COMPILE_TIME_ASSERT(RT_LAST == HIGH(opt->w32pe.compress_rt));
|
COMPILE_TIME_ASSERT(RT_LAST == TABLESIZE(opt->w32pe.compress_rt));
|
||||||
|
|
||||||
isection = NULL;
|
isection = NULL;
|
||||||
oimport = NULL;
|
oimport = NULL;
|
||||||
@@ -1831,7 +1831,7 @@ void PackW32Pe::pack(OutputFile *fo)
|
|||||||
memset(osection,0,sizeof(osection));
|
memset(osection,0,sizeof(osection));
|
||||||
|
|
||||||
oh.entry = upxsection;
|
oh.entry = upxsection;
|
||||||
oh.objects = HIGH(osection);
|
oh.objects = 3;
|
||||||
oh.chksum = 0;
|
oh.chksum = 0;
|
||||||
|
|
||||||
// fill the data directory
|
// fill the data directory
|
||||||
|
|||||||
Reference in New Issue
Block a user