Marcus' GGI targets added, fear!

This commit is contained in:
Joseph Carter 2000-01-02 08:50:13 +00:00
parent b75354555d
commit 247158c517
4 changed files with 142 additions and 9 deletions

View file

@ -41,6 +41,24 @@ if test "x$HAS_DGA" != xno; then
fi
dnl Checks for GGI support
GGI_CFLAGS=""
GGI_LIBS=""
AC_ARG_WITH(ggi,
[ --with-ggi=DIR use LibGGI found in DIR],
HAS_GGI=$withval, HAS_GGI=auto)
if test "x$HAS_GGI" != xno; then
if test "x$HAS_GGI" != xauto; then
GGI_CFLAGS="-I$withval/include"
GGI_LIBS="-L$withval/lib"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GGI_CFLAGS"
AC_CHECK_HEADER(ggi/ggi.h, HAS_GGI=yes, HAS_GGI=no)
CPPFLAGS="$save_CPPFLAGS"
fi
dnl Checks for SVGALib support
SVGA_CFLAGS=""
SVGA_LIBS=""
@ -159,13 +177,19 @@ if test "x$USE_DGA" != xyes; then
USE_DGA=no DGA_LIBS=""
fi
dnl Make sure -lggi works
if test "x$HAS_GGI" = xyes; then
AC_CHECK_LIB(ggi, ggiEventsQueued, GGI_LIBS="$GGI_LIBS -lggi"
HAS_GGI=yes, HAS_GGI=no, [$GGI_LIBS])
fi
if test "x$HAS_GGI" != xyes; then
GGI_CFLAGS="" GGI_LIBS=""
fi
dnl Make sure -lvga works
if test "x$HAS_SVGA" = xyes; then
save_LIBS="$LIBS"
LIBS="$SVGA_LIBS $LIBS"
AC_CHECK_LIB(vga, vga_getmousetype, SVGA_LIBS="$SVGA_LIBS -lvga"
HAS_VGA=yes, HAS_VGA=no, [$LIBS $SVGA_LIBS])
LIBS="$save_LIBS"
HAS_VGA=yes, HAS_VGA=no, [$SVGA_LIBS])
fi
if test "x$HAS_SVGA" != xyes; then
SVGA_CFLAGS="" SVGA_LIBS=""
@ -247,6 +271,9 @@ if test "x$HAS_DGA" = xyes; then
fi
AC_SUBST(HAS_DGA)
AC_SUBST(DGA_LIBS)
AC_SUBST(HAS_GGI)
AC_SUBST(GGI_CFLAGS)
AC_SUBST(GGI_LIBS)
AC_SUBST(HAS_SVGA)
AC_SUBST(SVGA_CFLAGS)
AC_SUBST(SVGA_LIBS)

View file

@ -20,7 +20,8 @@ ifneq ($(SRC_DIR),.)
SRC_DIR_INC = -I$(SRC_DIR)
endif
HAS_SVGA = @HAS_SVGA@
HAS_GGI = @HAS_GGI@
HAS_SVGA = @HAS_SVGA@
HAS_GLIDE = @HAS_GLIDE@
HAS_TDFXGL = @HAS_TDFXGL@
HAS_OGL = @HAS_OGL@
@ -57,6 +58,10 @@ ifeq ($(HAS_SVGA),yes)
SVGAQUAKE = $(BIN_PREFIX)-svga
endif
ifeq ($(HAS_GGI),yes)
GGIQUAKE = $(BIN_PREFIX)-ggi
endif
RELEASE = @RELEASE@
ifeq ($(RELEASE),yes)
OPTFLAGS = @RELEASE_CFLAGS@
@ -64,7 +69,7 @@ else
OPTFLAGS = -g
endif
targets = $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
.PHONY: $(targets) ($CLEAN_TARGETS)
@ -304,6 +309,57 @@ clean-$(SVGAQUAKE):
rm -f $(OBJSquake-svga)
endif
###########################################################################
#
# qw-client-ggi
#
ifneq ($(GGIQUAKE),)
# Map the list of source files into a list of object files
ALL_GGI_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(GGI_VID_SRC) model.c
OBJSquake-ggi = $(patsubst %,$(BUILD_DIR)/ggi/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_GGI_SRC) .c .s)))
GGI_CFLAGS = -DGGI @GGI_CFLAGS@
GGI_LDFLAGS = @GGI_LIBS@ -lm
GGI_VID_SRC = vid_ggi.c
# This can be thought of as a macro that makes sure that the ggi
# sub-directory is created
# XXX - can we avoid doing every compile?
MAKE_SURE_ggi_DIR = @DIR=ggi; $(MAKE_SURE_DIR)
$(BUILD_DIR)/ggi/%.o: $(SRC_DIR)/%.c
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
$(BUILD_DIR)/ggi/%.o: $(SRC_DIR)/%.s
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
$(BUILD_DIR)/ggi/%.o: $(COMMON_DIR)/%.c
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
ifneq ($(QW_COMMON_DIR),)
$(BUILD_DIR)/ggi/%.o: $(QW_COMMON_DIR)/%.c
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
endif
$(BUILD_DIR)/ggi/%.o: $(COMMON_DIR)/%.s
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
$(GGIQUAKE): $(BUILD_DIR)/../$(GGIQUAKE)
$(BUILD_DIR)/../$(GGIQUAKE): $(OBJSquake-ggi)
$(CC) $(CFLAGS) $(OBJSquake-ggi) $(GGI_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/../$(GGIQUAKE)
# XXX - Can this be automated?
clean-$(GGIQUAKE):
rm -f $(OBJSquake-ggi)
endif
###########################################################################
#
# qw-client-gl

View file

@ -19,6 +19,7 @@ ifneq ($(SRC_DIR),.)
SRC_DIR_INC = -I$(SRC_DIR)
endif
HAS_GGI = @HAS_GGI@
HAS_SVGA = @HAS_SVGA@
HAS_GLIDE = @HAS_GLIDE@
HAS_TDFXGL = @HAS_TDFXGL@
@ -56,6 +57,10 @@ ifeq ($(HAS_SVGA),yes)
SVGAQUAKE = $(BIN_PREFIX)-svga
endif
ifeq ($(HAS_GGI),yes)
GGIQUAKE = $(BIN_PREFIX)-ggi
endif
RELEASE = @RELEASE@
ifeq ($(RELEASE),yes)
OPTFLAGS = @RELEASE_CFLAGS@
@ -63,7 +68,7 @@ else
OPTFLAGS = -g
endif
targets = $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
.PHONY: $(targets) ($CLEAN_TARGETS)
@ -281,6 +286,50 @@ clean-$(SVGAQUAKE):
rm -f $(OBJSquake-svga)
endif
###########################################################################
#
# quake-ggi
#
ifneq ($(GGIQUAKE),)
# Map the list of source files into a list of object files
ALL_GGI_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(GGI_VID_SRC) model.c
OBJSquake-ggi = $(patsubst %,$(BUILD_DIR)/ggi/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_GGI_SRC) .c .s)))
GGI_CFLAGS = -DGGI @GGI_CFLAGS@
GGI_LDFLAGS = @GGI_LIBS@ -lm
GGI_VID_SRC = vid_ggi.c
# This can be thought of as a macro that makes sure that the ggi
# sub-directory is created
# XXX - can we avoid doing every compile?
MAKE_SURE_ggi_DIR = @DIR=ggi; $(MAKE_SURE_DIR)
$(BUILD_DIR)/ggi/%.o: $(SRC_DIR)/%.c
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
$(BUILD_DIR)/ggi/%.o: $(SRC_DIR)/%.s
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
$(BUILD_DIR)/ggi/%.o: $(COMMON_DIR)/%.c
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
$(BUILD_DIR)/ggi/%.o: $(COMMON_DIR)/%.s
$(MAKE_SURE_ggi_DIR)
$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
$(GGIQUAKE): $(BUILD_DIR)/../$(GGIQUAKE)
$(BUILD_DIR)/../$(GGIQUAKE): $(OBJSquake-ggi)
$(CC) $(CFLAGS) $(OBJSquake-ggi) $(GGI_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/../$(GGIQUAKE)
# XXX - Can this be automated?
clean-$(GGIQUAKE):
rm -f $(OBJSquake-ggi)
endif
###########################################################################
#
# quake-gl

View file

@ -109,8 +109,6 @@ Draw_Init
*/
void Draw_Init (void)
{
int i;
draw_chars = W_GetLumpName ("conchars");
draw_disc = W_GetLumpName ("disc");
draw_backtile = W_GetLumpName ("backtile");
@ -554,6 +552,9 @@ void Draw_ConsoleBackground (int lines)
#elif defined(X11)
sprintf (ver, "QuakeForge (X11 UQuake) v%s" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
#elif defined(GGI)
sprintf (ver, "QuakeForge (GGI UQuake) v%s" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
#elif defined(__linux__)
sprintf (ver, "QuakeForge (Linux UQuake) v%s" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);