freebsd-ports/sysutils/pesign/files/patch-Make.defaults
Edward Tomasz Napierala b7ec4f6183 New port: sysutils/pesign
Signing tool for PE-COFF binaries, hopefully at least vaguely compliant
with the PE and Authenticode specifications.

Sponsored by:	The FreeBSD Foundation
2015-01-21 13:40:24 +00:00

38 lines
1.2 KiB
Plaintext

--- Make.defaults.orig 2014-10-24 21:51:06.000000000 +0200
+++ Make.defaults 2015-01-16 10:34:32.000000000 +0100
@@ -4,22 +4,24 @@ PREFIX := /usr
HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
INCDIR = -I$(TOPDIR)/include
-CPPFLAGS = -DCONFIG_$(ARCH)
-CFLAGS = -g -O0
+CPPFLAGS += -DCONFIG_$(ARCH)
+CFLAGS += -g -O0
BUILDFLAGS := $(CFLAGS) $(ARCH3264) -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants --std=gnu99 -D_GNU_SOURCE -Wno-unused-result -Wno-unused-function
ASFLAGS = $(ARCH3264)
LDFLAGS = -nostdlib
CCLDFLAGS = -shared
INSTALL = install
-# XXX this is broken
-bindir = /usr/bin/
-CC = $(bindir)gcc
-AS = $(bindir)as
-LD = $(bindir)ld.bfd
-AR = $(bindir)ar
-RANLIB = $(bindir)ranlib
-OBJCOPY = $(bindir)objcopy
+CC = $(prefix)%%CC%%
+AS = $(prefix)as
+LD = $(prefix)ld.bfd
+AR = $(prefix)ar
+RANLIB = $(prefix)ranlib
+OBJCOPY = $(prefix)objcopy
+
+ifeq ($(ARCH),amd64)
+ ARCH = x86_64
+endif
ifeq ($(ARCH),ia64)
CFLAGS += -mfixed-range=f32-f127