$OpenBSD: patch-Makefile_target,v 1.2 2005/08/11 01:15:17 todd Exp $
--- Makefile.target.orig	Sun Jul 24 13:52:08 2005
+++ Makefile.target	Wed Aug 10 16:00:09 2005
@@ -17,7 +17,7 @@ ifdef CONFIG_USER_ONLY
 VPATH+=:$(SRC_PATH)/linux-user
 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
 endif
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+#CFLAGS=-Wall -O2 -g -fno-strict-aliasing
 #CFLAGS+=-Werror
 LDFLAGS=-g
 LIBS=
@@ -66,6 +66,10 @@ else
 OP_CFLAGS+= -malign-functions=0
 endif
 
+ifeq ($(shell uname -s),OpenBSD)
+OP_CFLAGS+= -fno-stack-protector
+endif
+
 ifdef TARGET_GPROF
 USE_I386_LD=y
 endif
@@ -151,6 +155,8 @@ endif
 #########################################################
 
 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+
+DEFINES+= #-DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE
 LIBS+=-lm
 ifndef CONFIG_USER_ONLY
 LIBS+=-lz
@@ -269,7 +275,10 @@ AUDIODRV += sdlaudio.o
 endif
 ifdef CONFIG_OSS
 AUDIODRV += ossaudio.o
+ifdef CONFIG_OSS_LIBRARY
+LIBS += -lossaudio
 endif
+endif
 
 pc.o: DEFINES := -DUSE_SB16 $(DEFINES)
 
@@ -288,6 +297,7 @@ ifeq ($(TARGET_BASE_ARCH), i386)
 VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
 VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
 VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o
+VL_OBJS+= pcnet.o
 endif
 ifeq ($(TARGET_BASE_ARCH), ppc)
 VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
@@ -427,7 +437,7 @@ clean:
 
 install: all 
 ifneq ($(PROGS),)
-	install -m 755 -s $(PROGS) "$(bindir)"
+	install -m 755 -s $(PROGS) "$(PREFIX)/bin/"
 endif
 
 ifneq ($(wildcard .depend),)
