--- Makefile.orig Thu Sep 14 17:59:13 2006 +++ Makefile Tue Nov 14 10:27:26 2006 @@ -12,6 +12,9 @@ # (WinPcap is used for Cygwin) HAS_PCAP?=1 +# Change this to 1 if your system has posix_memalign +HAS_POSIX_MEMALIGN?=0 + # Current dynamips release VERSION=0.2.5 VERSION_DEV=$(VERSION)-$(shell date +%Y%m%d-%H) @@ -30,15 +33,16 @@ -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" \ -DARCH_INC_FILE=$(ARCH_INC_FILE) -DDYNAMIPS_VERSION=\"$(VERSION)\" \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ - -DHAS_RFC2553=$(HAS_RFC2553) + -DHAS_RFC2553=$(HAS_RFC2553) -DHAS_POSIX_MEMALIGN=$(HAS_POSIX_MEMALIGN) -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 - CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf $(PTHREAD_CFLAGS) - LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) + LOCALBASE?=/usr/local + CFLAGS+=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/libelf $(PTHREAD_CFLAGS) + LIBS=-L$(LOCALBASE)/lib -L. -lelf $(PTHREAD_LIBS) $(LDFLAGS) else ifeq ($(shell uname -s), Darwin) CFLAGS+=-I/usr/local/include -mdynamic-no-pic