--- /dev/null
+--- doomlegacy/makefile.orig Sun May 6 01:39:28 2001
++++ doomlegacy/makefile Sat Jun 30 11:20:55 2001
+@@ -366,7 +366,7 @@
+ \r
+ # build a normal optimised version\r
+ ifdef PGCC\r
+- CFLAGS = $(OPTS) -mpentium -O6 -ffast-math -fomit-frame-pointer -fwritable-strings\r
++ CFLAGS = $(OPTS) $(OPTFLAGS) -ffast-math -fomit-frame-pointer -fwritable-strings\r
+ # -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \\r
+ # -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps \\r
+ # -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \\r
+@@ -506,7 +506,7 @@
+ \r
+ #dll\r
+ dll : $(O)/r_opengl.o $(O)/ogl_x11.o\r
+- $(CC) -mpentium -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lGL -lX11 -lXext -lGLU -lm\r
++ $(CC) $(OPTFLAGS) -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lGL -lX11 -lXext -lGLU -lm\r
+ \r
+ musserv:\r
+ @mkdir -p $(MUSSERV)/linux\r
+@@ -520,7 +520,7 @@
+ \r
+ ifdef LINUX\r
+ $(O)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h\r
+- $(CC) -mpentium -O6 -o $(O)/r_opengl.o -DHWRENDER -DVID_X11 -DLINUX -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c\r
++ $(CC) $(OPTFLAGS) -o $(O)/r_opengl.o -DHWRENDER -DVID_X11 -DLINUX -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c\r
+ endif\r
+ \r
+ ifdef SDL\r
+@@ -529,7 +529,7 @@
+ endif\r
+ \r
+ $(O)/ogl_x11.o: hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h\r
+- $(CC) -mpentium -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c\r
++ $(CC) $(OPTFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c\r
+ \r
+ \r
+ #dependecy made by gcc itself ! (see makedep.mak for more)\r
+--- doomlegacy/linux_x/sndserv/Makefile.orig Sun Apr 30 21:50:38 2000
++++ doomlegacy/linux_x/sndserv/Makefile Sat Jun 30 11:20:08 2001
+@@ -19,7 +19,7 @@
+ #\r
+ \r
+ CC=gcc\r
+-CFLAGS=-O2 -m486 -Wall -DNORMALUNIX -DLINUX\r
++CFLAGS=$(OPTFLAGS) -Wall -DNORMALUNIX -DLINUX\r
+ LDFLAGS=\r
+ LIBS=-lm\r
+ \r
+--- doomlegacy/linux_x/musserv/Makefile.linux.orig Sun Feb 27 01:42:12 2000
++++ doomlegacy/linux_x/musserv/Makefile.linux Sat Jun 30 11:20:08 2001
+@@ -3,7 +3,7 @@
+ #\r
+ \r
+ CC = gcc\r
+-CFLAGS = -I. -Wall -O2 -m486\r
++CFLAGS = -I. -Wall $(OPTFLAGS)\r
+ LDFLAGS =\r
+ #LDFLAGS = -static\r
+ \r
+--- doomlegacy/tools/makefile.orig Thu Jan 25 23:15:46 2001
++++ doomlegacy/tools/makefile Sat Jun 30 11:20:08 2001
+@@ -1,24 +1,24 @@
+ \r
+ default: dircomp2.c\r
+- gcc -O6 -mpentium -Wall -s dircomp2.c -o dircomp2.exe\r
++ gcc $(OPTFLAGS) -Wall -s dircomp2.c -o dircomp2.exe\r
+ \r
+ asm:\r
+- gcc -O6 -mpentium -Wall -g dircomp2.c -o tmp.exe\r
++ gcc $(OPTFLAGS) -Wall -g dircomp2.c -o tmp.exe\r
+ objdump -dS tmp.exe --debugging --no-show-raw-insn > dircomp2.s\r
+ del tmp.exe\r
+ \r
+ h2d: h2d.c\r
+- gcc -O6 -mpentium -Wall -s h2d.c -o h2d.exe\r
++ gcc $(OPTFLAGS) -Wall -s h2d.c -o h2d.exe\r
+ \r
+ dckconv: dckconv.c\r
+- gcc -O6 -mpentium -Wall -s dckconv.c -o dckconv.exe\r
++ gcc $(OPTFLAGS) -Wall -s dckconv.c -o dckconv.exe\r
+ \r
+ dckconv2: dckconv2.c\r
+- gcc -O6 -mpentium -Wall -s dckconv2.c -o dckconv2.exe\r
++ gcc $(OPTFLAGS) -Wall -s dckconv2.c -o dckconv2.exe\r
+ \r
+ dckcomp: dckcomp.c\r
+- gcc -O6 -mpentium -Wall -s dckcomp.c -o dckcomp.exe\r
++ gcc $(OPTFLAGS) -Wall -s dckcomp.c -o dckcomp.exe\r
+ \r
+ convert: convert.c\r
+- gcc -O6 -mpentium -Wall -s convert.c -o convert.exe\r
+- \r
++ gcc $(OPTFLAGS) -Wall -s convert.c -o convert.exe\r
++\r
--- /dev/null
+--- doomlegacy/linux_x/i_video_xshm.c.orig Fri May 11 14:54:59 2001
++++ doomlegacy/linux_x/i_video_xshm.c Sat Jun 30 10:55:58 2001
+@@ -1896,7 +1896,7 @@
+
+ rendermode = render_opengl;
+ //dlptr = dlopen("./r_opengl.so",RTLD_LAZY);
+- dlptr = dlopen("./r_opengl.so",RTLD_NOW | RTLD_GLOBAL);
++ dlptr = dlopen("/usr/X11R6/lib/doom/r_opengl.so",RTLD_NOW | RTLD_GLOBAL);
+ if(!dlptr) {
+ fprintf(stderr,"Error opening r_opengl.so!\n%s\n",dlerror());
+ rendermode = render_soft;
+--- doomlegacy/d_main.c.orig Fri May 11 14:33:54 2001
++++ doomlegacy/d_main.c Sat Jun 30 10:54:48 2001
+@@ -979,15 +979,7 @@
+ // change to the directory where 'doom3.wad' is found
+ I_LocateWad();
+ #endif
+- doomwaddir = getenv("DOOMWADDIR");
+- if (!doomwaddir)
+- {
+- // get the current directory (possible problem on NT with "." as current dir)
+- if ( getcwd(pathtemp, _MAX_PATH) != NULL )
+- doomwaddir = pathtemp;
+- else
+- doomwaddir = ".";
+- }
++ doomwaddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/ble/costam";
+
+ #ifdef __MACOS__
+ // cwd is always "/" when app is dbl-clicked