1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/archivers/upx/files/patch-Makefile
Max Khon 45eebd566c New port: upx 1.24
UPX is a free, portable, extendable, high-performance executable
packer for several different executable formats. It achieves an
excellent compression ratio and offers very fast decompression.
2004-02-17 03:05:13 +00:00

41 lines
954 B
Plaintext

--- Makefile.orig Mon Oct 28 16:43:34 2002
+++ Makefile Tue Feb 17 08:20:39 2004
@@ -3,6 +3,7 @@
#
# usage:
# `make target=linux' # linux
+# `make target=freebsd' # freebsd
# `make target=djggp2' # dos32 - djggp2 2.03
# `make target=cygwin' # win32 - cygwin 1.3.x
# `make target=mingw32' # win32 - mingw32
@@ -221,6 +222,29 @@
endif # linux
+
+###
+### FreeBSD
+###
+
+ifeq ($(target),freebsd)
+override arch := $(shell uname -m | sed -e 's/^i[3456789]86$$/i386/')
+DEFS += '-DUPX_CONFIG_H="config_h/freebsd.h"'
+
+ifeq ($(DEBUG),1)
+ ##CFLAGS += -O0 -gstabs+3
+ ##CFLAGS += -O0 -gdwarf-2
+ CFLAGS += -O0 -g
+else
+ ##LDFLAGS += -static
+ STUBEDIT_EXE = objcopy -S -R .comment -R .note $@
+ ifeq ($(arch),i386)
+# STUBIFY_EXE = perl $(srcdir)/stub/scripts/brandelf.pl $@
+ CHMOD_EXE = chmod 755 $@
+ endif
+endif
+
+endif # freebsd
###
### Linux cross compilers