8b658d61c5
A number of switches in the Quake makefile are no longer recognized by the system compiler in DragonFly (gcc 4.4), e.g. -m486 and -mpentium. These switches have alternatives such as mtune= that allows Quake to build on i386-DragonFly, so the existing patches were updated to used them. i386-NetBSD-5.99 was verified as well. i386-NetBSD-5.1 remains broken due to an unrelated X11 header buildlink problem (Xxf86dga.h vs xf86dga.h)
84 lines
3.2 KiB
Text
84 lines
3.2 KiB
Text
$NetBSD: patch-ai,v 1.10 2011/09/14 19:19:37 marino Exp $
|
|
|
|
--- WinQuake/Makefile.linuxi386.orig 1999-04-27 15:51:18.000000000 +0000
|
|
+++ WinQuake/Makefile.linuxi386
|
|
@@ -25,29 +25,31 @@ ARCH=i386
|
|
endif
|
|
NOARCH=noarch
|
|
|
|
-MOUNT_DIR=/grog/Projects/WinQuake
|
|
+MOUNT_DIR=${WRKSRC}/WinQuake
|
|
MASTER_DIR=/grog/Projects/QuakeMaster
|
|
-MESA_DIR=/usr/local/src/Mesa-2.6
|
|
+#MESA_DIR=/usr/local/src/Mesa-2.6
|
|
TDFXGL_DIR = /home/zoid/3dfxgl
|
|
|
|
-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
|
|
|
|
EGCS=/usr/local/egcs-1.1.2/bin/gcc
|
|
-CC=$(EGCS)
|
|
+#CC=$(EGCS)
|
|
|
|
-BASE_CFLAGS=-Dstricmp=strcasecmp
|
|
-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
|
|
+BASE_CFLAGS=-Dstricmp=strcasecmp -I${X11BASE}/include ${CFLAGS}
|
|
+RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mtune=pentiumpro -O6 -ffast-math -funroll-loops \
|
|
-fomit-frame-pointer -fexpensive-optimizations
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
|
-LDFLAGS=-lm
|
|
+LDFLAGS+=-lm
|
|
SVGALDFLAGS=-lvga
|
|
-XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga
|
|
-XCFLAGS=-DX11
|
|
+XLDFLAGS=-L/usr/X11R6/lib ${LDFLAGS} -lX11 -lXext -lXxf86dga
|
|
+XCFLAGS=-DX11 -I${X11BASE}/include ${CFLAGS}
|
|
|
|
-MESAGLLDFLAGS=-L/usr/X11/lib -L/usr/local/lib -L$(MESA_DIR)/lib -lMesaGL -lglide2x -lX11 -lXext -ldl
|
|
+MESAGLLDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib -L$(MESA_DIR)/lib -lMesaGL -lX11 -lXext
|
|
TDFXGLLDFLAGS=-L$(TDFXGL_DIR)/release$(ARCH)$(GLIBC) -l3dfxgl -lglide2x -ldl
|
|
-GLLDFLAGS=-L/usr/X11/lib -L/usr/local/lib -lGL -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm
|
|
+GLLDFLAGS=-L${X11BASE}/lib ${LDFLAGS} -L${MESA_DIR}/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm -lm
|
|
GLCFLAGS=-DGLQUAKE -I$(MESA_DIR)/include -I/usr/include/glide
|
|
|
|
DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
|
|
@@ -57,19 +59,28 @@ DO_GL_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(G
|
|
DO_X11_CC=$(CC) $(CFLAGS) $(XCFLAGS) -o $@ -c $<
|
|
DO_X11_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(XCFLAGS) -o $@ -c $<
|
|
DO_O_CC=$(CC) -O $(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) -DELF -x assembler-with-cpp -o $@ -c $<
|
|
+#DO_AS=$(CC) $(CFLAGS) -DAOUT -x assembler-with-cpp -o $@ -c $<
|
|
+DO_AS=$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
|
+#DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -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) -x assembler-with-cpp -o $@ -c $<
|
|
|
|
#############################################################################
|
|
# SETUP AND BUILD
|
|
#############################################################################
|
|
|
|
-TARGETS=$(BUILDDIR)/bin/squake \
|
|
- $(BUILDDIR)/bin/glquake \
|
|
- $(BUILDDIR)/bin/glquake.glx \
|
|
- $(BUILDDIR)/bin/glquake.3dfxgl \
|
|
+#TARGETS=$(BUILDDIR)/bin/squake \
|
|
+# $(BUILDDIR)/bin/glquake \
|
|
+# $(BUILDDIR)/bin/glquake.glx \
|
|
+# $(BUILDDIR)/bin/glquake.3dfxgl \
|
|
+# $(BUILDDIR)/bin/quake.x11
|
|
+# $(BUILDDIR)/bin/unixded
|
|
+
|
|
+TARGETS=$(BUILDDIR)/bin/glquake.glx \
|
|
$(BUILDDIR)/bin/quake.x11
|
|
- # $(BUILDDIR)/bin/unixded
|
|
+
|
|
+#TARGETS=$(BUILDDIR)/bin/quake.x11
|
|
|
|
build_debug:
|
|
@-mkdir $(BUILD_DEBUG_DIR) \
|