diff --git a/Makefile.in b/Makefile.in index 0f61e44..fb71ee5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,8 @@ SUBDIRS = qw_client qw_server uquake SRC_DIR = @srcdir@ +DESTDIR = + all: @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir $@ || exit; \ @@ -28,10 +30,11 @@ clean-autoconf mrproper: distclean # Code to automatically re-configure, only runs if you are compiling in the # source directory ifeq ($(SRC_DIR),.) -configure: configure.in - autoconf +configure: configure.in acconfig.h + ./bootstrap -Makefile: Makefile.in configure +Makefile: Makefile.in configure \ + qw_client/Makefile qw_server/Makefile uquake/Makefile ./configure qw_client/Makefile: qw_client/Makefile.in configure diff --git a/TODO b/TODO index 59ed422..62a750c 100644 --- a/TODO +++ b/TODO @@ -13,16 +13,13 @@ to quake-devel@lists.sourceforge.net with details. possible buffer overruns * Devise and implement a way to ensure original gameplay compatibility while still letting us expand and extend the quake engine - * configure.in: clean up the intel -mcpu stuff * Audio support for more platforms * Add OpenGL multi-pass texturing replacement for when multi-texturing extension isn't available * README: add tested platforms and results - * Makefile.in, */Makefile.in: Add install target * Remove dependency on GNU make or migrate to automake * Quake/QW Client: Add proper XFree86 DGA/VideoMode support to X-based targets on systems with XFree86 available - * Merge in GGIQuake * Merge SDLQuake (BigM created a patch against an older revision of our main tree) * Add currently removed documentation to the README, and also add more diff --git a/acconfig.h b/acconfig.h index 2258e02..ff13b9c 100644 --- a/acconfig.h +++ b/acconfig.h @@ -12,6 +12,9 @@ # define GLAPIENTRY APIENTRY #endif +/* Define this to something sane if you don't have stricmp */ +#undef stricmp + /* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */ #undef HAVE_GL_COLOR_INDEX8_EXT diff --git a/configure.in b/configure.in index 366c226..3c199dd 100644 --- a/configure.in +++ b/configure.in @@ -331,13 +331,14 @@ AC_SUBST(TDFXGL_LIBS) AC_SUBST(HAS_SDL) AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) +AC_SUBST(prefix) +AC_SUBST(bindir) +AC_SUBST(mandir) dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNC(stricmp, - [STRICMP_DEF=], - AC_CHECK_FUNC(strcasecmp, [STRICMP_DEF=-Dstricmp=strcasecmp])) -AC_SUBST(STRICMP_DEF) +AC_CHECK_FUNC(stricmp,, + AC_CHECK_FUNC(strcasecmp, AC_DEFINE(stricmp,strcasecmp))) ########################################################## diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..6b3b5fc --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id$ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/qw_client/Makefile.in b/qw_client/Makefile.in index c6498ff..cce9272 100644 --- a/qw_client/Makefile.in +++ b/qw_client/Makefile.in @@ -6,10 +6,16 @@ PROJECT_DIR = @top_srcdir@ SRC_DIR = @srcdir@ QW_COMMON_DIR= $(PROJECT_DIR)/qw_common -COMMON_DIR=$(PROJECT_DIR)/common +COMMON_DIR = $(PROJECT_DIR)/common BIN_PREFIX = qw-client -BUILD_DIR = ../targets/qw_client +DESTDIR = + +prefix = @prefix@ +bindir = @bindir@ +mandir = @mandir@ + +BUILD_DIR = ../targets/qw_client LDFLAGS = @LDFLAGS@ @SND_LIBS@ LIBS = @LIBS@ @@ -198,9 +204,9 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ # # Directory specific stuff # -DEFS = @DEFS@ @STRICMP_DEF@ -CFLAGS = -Wall -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ --I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I../common +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ -Wall -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \ +$(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(QW_X11_VID_SRC) model.c ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) $(QW_GL_REND_SRC) ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC) $(QW_GL_REND_SRC) @@ -522,9 +528,16 @@ distclean: clean rm -f config.cache config.log config.status Makefile clean: $(CLEAN_TARGETS) + for i in $(targets); do \ + rm -f $(BUILD_DIR)/../$$i; \ + done -install: - @echo Install not implemented +install: $(targets) + $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir) + for i in $(targets); do \ + $(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \ + $(DESTDIR)$(prefix)$(bindir)/$$i; \ + done check: @echo check not implemented diff --git a/qw_server/Makefile.in b/qw_server/Makefile.in index c0a34b9..9fdb3c0 100644 --- a/qw_server/Makefile.in +++ b/qw_server/Makefile.in @@ -6,6 +6,12 @@ PROJECT_DIR = @top_srcdir@ SRC_DIR = @srcdir@ +DESTDIR = + +prefix = @prefix@ +bindir = @bindir@ +mandir = @mandir@ + COMMON_DIR=$(PROJECT_DIR)/common QW_COMMON_DIR= $(PROJECT_DIR)/qw_common BUILD_DIR = ../targets/qw_server @@ -64,9 +70,9 @@ QW_GENERAL_SRC = pmove.c pmovetst.c # # Directory specific stuff # -CFLAGS = -DQUAKEWORLD -DSERVERONLY $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ --I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I../common -DEFS = @DEFS@ @STRICMP_DEF@ +CFLAGS = @CFLAGS@ -DQUAKEWORLD -DSERVERONLY $(OPTFLAGS) $(DEFS) -I. \ +$(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) +DEFS = @DEFS@ SRVQUAKE = qw-server targets = $(SRVQUAKE) @@ -135,9 +141,16 @@ distclean: clean rm -f config.cache config.log config.status Makefile clean: $(CLEAN_TARGETS) - -install: - @echo Install not implemented + for i in $(targets); do \ + rm -f $(BUILD_DIR)/../$$i; \ + done + +install: $(targets) + $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir) + for i in $(targets); do \ + $(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \ + $(DESTDIR)$(prefix)$(bindir)/$$i; \ + done check: @echo check not implemented diff --git a/uquake/Makefile.in b/uquake/Makefile.in index cd2407e..30bf52e 100644 --- a/uquake/Makefile.in +++ b/uquake/Makefile.in @@ -7,6 +7,12 @@ PROJECT_DIR = @top_srcdir@ SRC_DIR = @srcdir@ BIN_PREFIX = quake +DESTDIR = + +prefix = @prefix@ +bindir = @bindir@ +mandir = @mandir@ + COMMON_DIR=$(PROJECT_DIR)/common BUILD_DIR =../targets/uquake @@ -77,11 +83,6 @@ targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(S CLEAN_TARGETS = $(patsubst %,clean-%, $(targets)) .PHONY: $(targets) ($CLEAN_TARGETS) -x: Makefile - @echo binaries: $(targets) - @echo other targets: distclean - @echo all: makes all targets - $(targets) - all: $(targets) ######################################################################## @@ -187,8 +188,8 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ # Directory specific stuff # DEFS = @DEFS@ -CFLAGS = $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) -I$(COMMON_DIR) \ --I../common -I$(SRC_DIR)/include +CFLAGS = @CFLAGS@ $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ +-I$(COMMON_DIR) -I$(SRC_DIR)/include ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(X11_VID_SRC) model.c ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC) @@ -474,9 +475,16 @@ distclean: clean rm -f config.cache config.log config.status Makefile clean: $(CLEAN_TARGETS) + for i in $(targets); do \ + rm -f $(BUILD_DIR)/../$$i; \ + done -install: - @echo Install not implemented +install: $(targets) + $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir) + for i in $(targets); do \ + $(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \ + $(DESTDIR)$(prefix)$(bindir)/$$i; \ + done check: @echo check not implemented