$NetBSD$

--- Makefile.orig	2004-07-14 00:45:11.000000000 +0200
+++ Makefile	2004-07-14 00:46:01.000000000 +0200
@@ -1,18 +1,18 @@
 #Makefile MUPEN64 for Linux
 
-CC		=gcc
-CXX		=g++
+#CC		=gcc
+#CXX		=g++
 
 #CFLAGS		=-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG
-CFLAGS		=-DX86 -O3 -fomit-frame-pointer -funroll-loops -ffast-math -mcpu=athlon -Wall -pipe
+#CFLAGS		=-DX86 -O3 -fomit-frame-pointer -funroll-loops -ffast-math -mcpu=athlon -Wall -pipe
 #CFLAGS		=-DX86 -O3 -mcpu=pentium -Wall -g -pg
 #CFLAGS		=-DX86 -Wall -pipe -g3 -DEMU64_DEBUG
 #CFLAGS		=-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE
 #CFLAGS		=-DX86 -Wall -pipe -g
 
-CXXFLAGS	=$(CFLAGS)
+#CXXFLAGS	=$(CFLAGS)
 
-GL_PATH		=-I/usr/X11R6/include
+GL_PATH		=-I@BLNK@/include
 
 OBJ		=main/rom.o \
 		r4300/r4300.o \
@@ -143,7 +143,7 @@
 ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1")
 
 mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI)
-		$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic `gtk-config --libs` -L/usr/X11R6/lib -lSDL -lGL -lpthread -ldl -o $@
+		$(CC) $^ $(CFLAGS) @LDFLAGS@ $(LIB) `gtk-config --libs` -lSDL -lGL -o $@
 		strip --strip-all $@
 
 else
