diff options
Diffstat (limited to 'emulators/dynamips/patches/patch-aa')
-rw-r--r-- | emulators/dynamips/patches/patch-aa | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/emulators/dynamips/patches/patch-aa b/emulators/dynamips/patches/patch-aa new file mode 100644 index 00000000000..f2b4a78bac3 --- /dev/null +++ b/emulators/dynamips/patches/patch-aa @@ -0,0 +1,56 @@ +$NetBSD: patch-aa,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ + +--- Makefile.orig 2007-05-26 11:52:33.000000000 +0200 ++++ Makefile 2007-07-16 19:07:57.000000000 +0200 +@@ -3,7 +3,19 @@ + + # Replace x86 by amd64 for a build on x86_64. + # Use "nojit" for architectures that are not x86 or x86_64. +-DYNAMIPS_ARCH?=x86 ++ifeq ($(shell uname -m), i386) ++ DYNAMIPS_ARCH?=x86 ++else ++ifeq ($(shell uname -m), i686) ++ DYNAMIPS_ARCH?=x86 ++else ++ifeq ($(shell uname -m), amd64) ++ DYNAMIPS_ARCH?=amd64 ++else ++ DYNAMIPS_ARCH?=nojit ++endif ++endif ++endif + + # Change this to 0 if your system doesn't support RFC 2553 extensions + HAS_RFC2553?=1 +@@ -40,8 +52,8 @@ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ + -DHAS_RFC2553=$(HAS_RFC2553) + +-PCAP_LIB=/usr/local/lib/libpcap.a +-#PCAP_LIB=-lpcap ++#PCAP_LIB=/usr/local/lib/libpcap.a ++PCAP_LIB=-lpcap + + ifeq ($(shell uname), FreeBSD) + PTHREAD_LIBS?=-pthread +@@ -49,6 +61,11 @@ + -D_FILE_OFFSET_BITS=64 + LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) + else ++ifeq ($(shell uname -s), NetBSD) ++ PTHREAD_LIBS?=-pthread ++ CFLAGS+=-I${LOCALBASE}/include -I${LOCALBASE}/include/libelf ${PTHREAD_CFLAGS} ++ LIBS=-L${LOCALBASE}/lib -lelf ${PTHREAD_LIBS} ${PTHREAD_LDFLAGS} -R${LOCALBASE}/lib ++else + ifeq ($(shell uname), Linux) + PTHREAD_LIBS?=-lpthread + # PCAP_LIB=-lpcap +@@ -80,6 +97,7 @@ + endif + endif + endif ++endif + + PROG=dynamips$(BIN_EXT) + PACKAGE=$(PROG)-$(VERSION) |