ports/emulators/dynamips-devel/files/patch-Makefile
Max Khon 5775a87fbc Update to 0.2.3c.
- Fixed a stupid bug in DMA handling, which in certain conditions can
cause an infinite loop.
- Added an "instruction block hash" which avoids lookups in the instruction
red-black tree. The IBH table takes only 16 Kb of memory.
- Added CRC-12 and CRC-16 functions for future use.
- Added a "gen_eth" NetIO driver, which allow to access ethernet interfaces
in a portable way (tested on Linux and Cygwin).
- Fixes to the PowerPC build on Darwin thanks to Olivier Cahagne.
- Minor cosmetic changes to display supported/unsupported PA and NPE.

Note: gen_eth is not supported on RELENG_4 (requires libpcap 0.9+).
2006-02-13 19:42:36 +00:00

71 lines
1.8 KiB
Text

--- Makefile.orig Thu Feb 2 00:08:41 2006
+++ Makefile Tue Feb 14 01:26:49 2006
@@ -3,7 +3,7 @@
# Replace x86 by amd64 for a build on x86_64.
# Use "nojit" for architectures that are not x86 or x86_64.
-ARCH=x86
+DYNAMIPS_ARCH?=x86
# Change this to 0 if your system doesn't support RFC 2553 extensions
HAS_RFC2553=1
@@ -15,14 +15,14 @@
# Current dynamips release
VERSION=0.2.3c
-CC=gcc
+CC?=gcc
LD=ld
RM=rm
TAR=tar
CP=cp
LEX=flex
-ARCH_INC_FILE=\"$(ARCH)_trans.h\"
-CFLAGS=-g -Wall -O3 -fomit-frame-pointer -DJIT_ARCH=\"$(ARCH)\" \
+ARCH_INC_FILE=\"$(DYNAMIPS_ARCH)_trans.h\"
+CFLAGS+=-g -Wall -O3 -fomit-frame-pointer -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" \
-DARCH_INC_FILE=$(ARCH_INC_FILE) \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
-DHAS_RFC2553=$(HAS_RFC2553)
@@ -30,8 +30,9 @@
PCAP_LIB=-lpcap
ifeq ($(shell uname), FreeBSD)
- CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf
- LIBS=-L/usr/local/lib -L. -lelf -pthread
+ PTHREAD_LIBS?=-pthread
+ CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf $(PTHREAD_CFLAGS)
+ LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS)
else
ifeq ($(shell uname -s), Darwin)
CFLAGS+=-I/usr/local/include
@@ -73,17 +74,17 @@
#SOURCES += profiler.c
#CFLAGS += -p -DPROFILE -DPROFILE_FILE=\"$(PROG).profile\"
-ifeq ($(ARCH),x86)
+ifeq ($(DYNAMIPS_ARCH),x86)
HDR += x86-codegen.h x86_trans.h
SOURCES += x86_trans.c
endif
-ifeq ($(ARCH),amd64)
+ifeq ($(DYNAMIPS_ARCH),amd64)
HDR += x86-codegen.h amd64-codegen.h amd64_trans.h
SOURCES += amd64_trans.c
endif
-ifeq ($(ARCH),nojit)
+ifeq ($(DYNAMIPS_ARCH),nojit)
HDR += nojit_trans.h
SOURCES += nojit_trans.c
endif
@@ -123,7 +124,7 @@
.PHONY: microcode
microcode:
- @$(CC) -Wall -o rom2c rom2c.c $(LIBS)
+ @$(CC) -Wall $(CFLAGS) -o rom2c rom2c.c $(LIBS)
@./rom2c microcode microcode_dump.inc
.PHONY: clean