--- Makefile.orig 2004-02-03 22:17:10.302818528 -0500 +++ Makefile.orig 2004-02-03 22:18:14.369078976 -0500 @@ -58,11 +58,13 @@ ifneq ($(ARCH),axp) ifneq ($(ARCH),ppc) ifneq ($(ARCH),sparc) +ifneq ($(ARCH),x86_64) $(error arch $(ARCH) is currently not supported) endif endif endif endif +endif CC=gcc @@ -82,12 +84,16 @@ endif ifeq ($(ARCH),i386) -RELEASE_CFLAGS=-ffast-math -funroll-loops $(BASE_CFLAGS) -# -falign-jumps=2 -falign-functions=2 -g +RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -malign-loops=2 \ + -malign-jumps=2 -malign-functions=2 -g # compiler bugs with gcc 2.96 and 3.0.1 can cause bad builds with heavy opts. #RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -m486 -ffast-math -funroll-loops \ -# -fomit-frame-pointer -fexpensive-optimizations -falign-loops=2 \ -# -falign-jumps=2 -falign-functions=2 +# -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ +# -malign-jumps=2 -malign-functions=2 +endif + +ifeq ($(ARCH),x86_64) +RELEASE_CFLAGS=$(BASE_CFLAGS) -fomit-frame-pointer -fexpensive-optimizations endif VERSION=3.21+rCVS @@ -338,11 +344,40 @@ endif endif # ARCH i386 +ifeq ($(ARCH),x86_64) + ifeq ($(strip $(BUILD_SDLQUAKE2)),YES) + TARGETS += $(BUILDDIR)/sdlquake2 + endif + + ifeq ($(strip $(BUILD_SVGA)),YES) + TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_X11)),YES) + TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_GLX)),YES) + TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_FXGL)),YES) + TARGETS += $(BUILDDIR)/ref_gl.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_SDL)),YES) + TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_SDLGL)),YES) + TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT) + endif +endif # ARCH x86_64 + ifeq ($(strip $(BUILD_AA)),YES) TARGETS += $(BUILDDIR)/ref_softaa.$(SHLIBEXT) endif -RELEASE_CFLAGS += $(OPTCFLAGS) all: build_debug build_release build_debug: @@ -441,7 +476,8 @@ QUAKE2_AS_OBJS = \ $(BUILDDIR)/client/snd_mixa.o else -QUAKE2_AS_OBJS = #blank +QUAKE2_AS_OBJS = \ + $(BUILDDIR)/client/snd_mixa.o #forcing for all to include x86_64, probably dangerous endif $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS) @@ -1540,6 +1576,21 @@ $(BUILDDIR)/ref_soft/sys_dosa.o endif +ifeq ($(ARCH),x86_64) #do the same as i386 +REF_SOFT_OBJS += \ + $(BUILDDIR)/ref_soft/r_aclipa.o \ + $(BUILDDIR)/ref_soft/r_draw16.o \ + $(BUILDDIR)/ref_soft/r_drawa.o \ + $(BUILDDIR)/ref_soft/r_edgea.o \ + $(BUILDDIR)/ref_soft/r_scana.o \ + $(BUILDDIR)/ref_soft/r_spr8.o \ + $(BUILDDIR)/ref_soft/r_surf8.o \ + $(BUILDDIR)/ref_soft/math.o \ + $(BUILDDIR)/ref_soft/d_polysa.o \ + $(BUILDDIR)/ref_soft/r_varsa.o \ + $(BUILDDIR)/ref_soft/sys_dosa.o +endif + REF_SOFT_SVGA_OBJS = \ $(BUILDDIR)/ref_soft/rw_svgalib.o \ $(BUILDDIR)/ref_soft/d_copy.o \