--- Makefile.orig	Mon Mar 27 02:32:00 2006
+++ Makefile	Fri Jun 16 04:30:11 2006
@@ -213,7 +213,7 @@
 ifndef WIN32
 	ifndef MORPHOS
 		ifndef OSX
-			LDFLAGS+=-lpthread
+			LDFLAGS+=${PTHREAD_LIBS}
 		endif
 	endif
 endif
@@ -319,7 +319,7 @@
 # GNU make can only test for (in)equality
 # this is a workaround to test for >=
 ifeq ($(shell expr $(CC_VERSION) \>= 29), 1)
-  CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wundef
+  CFLAGS += -Wall -Wno-multichar -Wsign-compare -Wundef
   CC_CFLAGS += -Wstrict-prototypes
   CFLAGS += -Wwrite-strings -Wpointer-arith
 endif
@@ -377,8 +377,6 @@
 ifdef MORPHOS
 BASECFLAGS += -I/gg/os-include -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations
 BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple
-else
-BASECFLAGS += -O2
 endif
 ifndef PROFILE
 ifndef IRIX
