vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 5b9a5aabc3cbe6a784a75eaeedb6e2419a702802
parent 48f1234eb07fb8c62ba5a38277be2c99ff1074b3
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Sun, 12 Sep 2010 23:56:39 +0200

fix darwin build

Diffstat:
MCONTRIBUTORS | 3++-
Msrc/9vx/Makefrag | 12+++++++++---
Msrc/Makefrag | 7++++++-
Msrc/libvx32/Makefrag | 1+
4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/CONTRIBUTORS b/CONTRIBUTORS @@ -3,10 +3,11 @@ The following people have contributed source code to vx32. Bryan Ford <baford@pdos.csail.mit.edu> Michael Teichgräber <mt4swm@googlemail.com> Russ Cox <rsc@swtch.com> -Charles Forsyth <forsyth@terzarima.net> +Charles Forsyth Jesus Galan Lopez <yiyu.jgl@gmail.com> Tuly Gray Devon H. O'Dell +Prem Mallappa Ron Minnich Erik Quantrom Brian L. Stuart diff --git a/src/9vx/Makefrag b/src/9vx/Makefrag @@ -2,18 +2,24 @@ ifeq ($(OS),linux) PLAN9VX=1 PLAN9GUI=x11 PLAN9AUDIO=unix +PLAN9PCAP=nopcap +PLAN9TAP=notap endif ifeq ($(OS),darwin) PLAN9VX=1 PLAN9GUI=osx PLAN9AUDIO=none +PLAN9PCAP=nopcap +PLAN9TAP=notap endif ifeq ($(OS),freebsd) PLAN9VX=1 PLAN9GUI=x11 PLAN9AUDIO=unix +PLAN9PCAP=nopcap +PLAN9TAP=notap endif # If you don't have/want X11 @@ -21,8 +27,8 @@ endif # Virtual ethernet devices #PLAN9PCAP=etherpcap -PLAN9PCAP=nopcap -PLAN9TAP=ethertap +#PLAN9PCAP=nopcap +#PLAN9TAP=ethertap #PLAN9TAP=notap ifeq ($(PLAN9VX),1) @@ -205,7 +211,7 @@ PLAN9_DEPS = \ libvx32/libvx32.a \ 9vx/9vx: $(PLAN9_DEPS) - $(HOST_CC) -o $@ $(PLAN9_DEPS) $(PLAN9_GUI_LIBS) $(PLAN9_IP_LIBS) -lpthread + $(HOST_CC) -o $@ $(HOST_LDFLAGS) $(PLAN9_DEPS) $(PLAN9_GUI_LIBS) $(PLAN9_IP_LIBS) -lpthread 9vx/a/%.o: 9vx/a/%.c $(HOST_CC) $(HOST_CFLAGS) -I. -I9vx -I9vx/a -Wall -Wno-missing-braces -c -o $@ $< diff --git a/src/Makefrag b/src/Makefrag @@ -4,7 +4,12 @@ COMMON_CFLAGS = -g -O2 -MD -std=gnu99 -I. -fno-stack-protector $(CFLAGS) COMMON_LDFLAGS = -g -L. $(LDFLAGS) -# Host environment compiler options +ifeq ($(OS),darwin) +COMMON_CFLAGS += -m32 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE +COMMON_LDFLAGS += -m32 +endif + + # Host environment compiler options HOST_CC := $(CC) -fno-inline HOST_LD := $(LD) HOST_AR := $(AR) diff --git a/src/libvx32/Makefrag b/src/libvx32/Makefrag @@ -9,6 +9,7 @@ endif endif ifeq ($(OS),darwin) +VX32_RUN = run32.o VX32_RUN := $(VX32_RUN) darwin-asm.o endif