$NetBSD: patch-ae,v 1.5 2000/10/05 05:53:36 jlam Exp $ --- QW/Makefile.Linux.orig Wed Apr 21 20:16:24 1999 +++ QW/Makefile.Linux @@ -27,41 +27,51 @@ RPMARCH=i386 endif -MAINDIR=/grog/Projects/QW - -BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC) -BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC) +#BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC) +#BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC) +BUILD_DEBUG_DIR=debug_version +BUILD_RELEASE_DIR=release_version CLIENT_DIR=$(MAINDIR)/client SERVER_DIR=$(MAINDIR)/server -MESA_DIR=/usr/local/src/Mesa-3.0 +#MESA_DIR=/usr/local/src/Mesa-3.0 CC=gcc -BASE_CFLAGS=-Wall -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) +BASE_CFLAGS=-Wall -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) \ + ${CFLAGS} -I${X11BASE}/include -O0 DEBUG_CFLAGS=$(BASE_CFLAGS) -g ifeq ($(ARCH),axp) RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \ -fomit-frame-pointer -fexpensive-optimizations else -RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ +# Optimizer bug?!?!? +#RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ +# -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ +# -malign-jumps=2 -malign-functions=2 +RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -ffast-math -funroll-loops \ -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ -malign-jumps=2 -malign-functions=2 endif -GLCFLAGS=-DGLQUAKE -I/usr/local/src/Mesa-3.0/include -I/usr/include/glide +GLCFLAGS=-DGLQUAKE -I${MESA_DIR}/include -I/usr/include/glide -LDFLAGS=-lm +LDFLAGS=-lm -lossaudio SVGALDFLAGS=-lvga -XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -GL_SVGA_LDFLAGS=-L/usr/X11/lib -L/usr/local/src/Mesa-3.0/lib -lm -lMesaGL -lglide2x -lX11 -lXext -lvga -GL_X11_LDFLAGS=-L/usr/X11/lib -L/usr/local/src/Mesa-3.0/lib -lm -lGL -lX11 -lXext +XLDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -lX11 -lXext +GL_SVGA_LDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -L${MESA_DIR}/lib -Wl,-rpath -Wl,${MESA_DIR}/lib -lm -lMesaGL -lglide2x -lX11 -lXext -lvga +GL_X11_LDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -L${MESA_DIR}/lib -Wl,-rpath -Wl,${MESA_DIR}/lib -lm -lGL -lX11 -lXext DO_CC=$(CC) $(CFLAGS) -o $@ -c $< -DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $< +#DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $< +DO_O_CC=$(CC) $(CFLAGS) -o $@ -c $< DO_GL_CC=$(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $< DO_SERVER_CC=$(CC) -DSERVERONLY $(CFLAGS) -o $@ -c $< -DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< -DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< +DO_AS=$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $< +#DO_AS=$(CC) $(CFLAGS) -DAOUT -x assembler-with-cpp -o $@ -c $< +#DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< +DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -x assembler-with-cpp -o $@ -c $< +#DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DAOUT -x assembler-with-cpp -o $@ -c $< +#DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< ############################################################################# # SETUP AND BUILD @@ -71,7 +81,7 @@ TARGETS=$(BUILDDIR)/qwsv #$(BUILDDIR)/qwcl.x11 else -TARGETS=$(BUILDDIR)/qwsv $(BUILDDIR)/qwcl $(BUILDDIR)/qwcl.x11 $(BUILDDIR)/glqwcl $(BUILDDIR)/glqwcl.glx +TARGETS=$(BUILDDIR)/qwsv $(BUILDDIR)/qwcl.x11 $(BUILDDIR)/glqwcl.glx endif build_debug: @@ -485,7 +495,7 @@ $(BUILDDIR)/client/zone.o : $(CLIENT_DIR)/zone.c $(DO_CC) -$(BUILDDIR)/client/cd_linux.o : $(CLIENT_DIR)/cd_linux.c +$(BUILDDIR)/client/cd_linux.o : $(CLIENT_DIR)/cd_linux.c $(DO_CC) $(BUILDDIR)/client/sys_linux.o : $(CLIENT_DIR)/sys_linux.c @@ -609,7 +619,7 @@ $(BUILDDIR)/glclient/math.o \ $(BUILDDIR)/glclient/snd_mixa.o \ $(BUILDDIR)/glclient/sys_dosa.o - + GLQWCL_SVGA_OBJS = $(BUILDDIR)/glclient/gl_vidlinux.o GLQWCL_X11_OBJS = $(BUILDDIR)/glclient/gl_vidlinuxglx.o @@ -715,7 +725,7 @@ $(BUILDDIR)/glclient/zone.o : $(CLIENT_DIR)/zone.c $(DO_GL_CC) -$(BUILDDIR)/glclient/cd_linux.o : $(CLIENT_DIR)/cd_linux.c +$(BUILDDIR)/glclient/cd_linux.o : $(CLIENT_DIR)/cd_linux.c $(DO_GL_CC) $(BUILDDIR)/glclient/sys_linux.o : $(CLIENT_DIR)/sys_linux.c