mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-12 06:51:14 +00:00
Marcus' GGI targets added, fear!
This commit is contained in:
parent
b75354555d
commit
247158c517
4 changed files with 142 additions and 9 deletions
35
configure.in
35
configure.in
|
@ -41,6 +41,24 @@ if test "x$HAS_DGA" != xno; then
|
||||||
fi
|
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
|
dnl Checks for SVGALib support
|
||||||
SVGA_CFLAGS=""
|
SVGA_CFLAGS=""
|
||||||
SVGA_LIBS=""
|
SVGA_LIBS=""
|
||||||
|
@ -159,13 +177,19 @@ if test "x$USE_DGA" != xyes; then
|
||||||
USE_DGA=no DGA_LIBS=""
|
USE_DGA=no DGA_LIBS=""
|
||||||
fi
|
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
|
dnl Make sure -lvga works
|
||||||
if test "x$HAS_SVGA" = xyes; then
|
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"
|
AC_CHECK_LIB(vga, vga_getmousetype, SVGA_LIBS="$SVGA_LIBS -lvga"
|
||||||
HAS_VGA=yes, HAS_VGA=no, [$LIBS $SVGA_LIBS])
|
HAS_VGA=yes, HAS_VGA=no, [$SVGA_LIBS])
|
||||||
LIBS="$save_LIBS"
|
|
||||||
fi
|
fi
|
||||||
if test "x$HAS_SVGA" != xyes; then
|
if test "x$HAS_SVGA" != xyes; then
|
||||||
SVGA_CFLAGS="" SVGA_LIBS=""
|
SVGA_CFLAGS="" SVGA_LIBS=""
|
||||||
|
@ -247,6 +271,9 @@ if test "x$HAS_DGA" = xyes; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST(HAS_DGA)
|
AC_SUBST(HAS_DGA)
|
||||||
AC_SUBST(DGA_LIBS)
|
AC_SUBST(DGA_LIBS)
|
||||||
|
AC_SUBST(HAS_GGI)
|
||||||
|
AC_SUBST(GGI_CFLAGS)
|
||||||
|
AC_SUBST(GGI_LIBS)
|
||||||
AC_SUBST(HAS_SVGA)
|
AC_SUBST(HAS_SVGA)
|
||||||
AC_SUBST(SVGA_CFLAGS)
|
AC_SUBST(SVGA_CFLAGS)
|
||||||
AC_SUBST(SVGA_LIBS)
|
AC_SUBST(SVGA_LIBS)
|
||||||
|
|
|
@ -20,6 +20,7 @@ ifneq ($(SRC_DIR),.)
|
||||||
SRC_DIR_INC = -I$(SRC_DIR)
|
SRC_DIR_INC = -I$(SRC_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HAS_GGI = @HAS_GGI@
|
||||||
HAS_SVGA = @HAS_SVGA@
|
HAS_SVGA = @HAS_SVGA@
|
||||||
HAS_GLIDE = @HAS_GLIDE@
|
HAS_GLIDE = @HAS_GLIDE@
|
||||||
HAS_TDFXGL = @HAS_TDFXGL@
|
HAS_TDFXGL = @HAS_TDFXGL@
|
||||||
|
@ -57,6 +58,10 @@ ifeq ($(HAS_SVGA),yes)
|
||||||
SVGAQUAKE = $(BIN_PREFIX)-svga
|
SVGAQUAKE = $(BIN_PREFIX)-svga
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAS_GGI),yes)
|
||||||
|
GGIQUAKE = $(BIN_PREFIX)-ggi
|
||||||
|
endif
|
||||||
|
|
||||||
RELEASE = @RELEASE@
|
RELEASE = @RELEASE@
|
||||||
ifeq ($(RELEASE),yes)
|
ifeq ($(RELEASE),yes)
|
||||||
OPTFLAGS = @RELEASE_CFLAGS@
|
OPTFLAGS = @RELEASE_CFLAGS@
|
||||||
|
@ -64,7 +69,7 @@ else
|
||||||
OPTFLAGS = -g
|
OPTFLAGS = -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
targets = $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
|
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
|
||||||
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
||||||
.PHONY: $(targets) ($CLEAN_TARGETS)
|
.PHONY: $(targets) ($CLEAN_TARGETS)
|
||||||
|
|
||||||
|
@ -304,6 +309,57 @@ clean-$(SVGAQUAKE):
|
||||||
rm -f $(OBJSquake-svga)
|
rm -f $(OBJSquake-svga)
|
||||||
endif
|
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
|
# qw-client-gl
|
||||||
|
|
|
@ -19,6 +19,7 @@ ifneq ($(SRC_DIR),.)
|
||||||
SRC_DIR_INC = -I$(SRC_DIR)
|
SRC_DIR_INC = -I$(SRC_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HAS_GGI = @HAS_GGI@
|
||||||
HAS_SVGA = @HAS_SVGA@
|
HAS_SVGA = @HAS_SVGA@
|
||||||
HAS_GLIDE = @HAS_GLIDE@
|
HAS_GLIDE = @HAS_GLIDE@
|
||||||
HAS_TDFXGL = @HAS_TDFXGL@
|
HAS_TDFXGL = @HAS_TDFXGL@
|
||||||
|
@ -56,6 +57,10 @@ ifeq ($(HAS_SVGA),yes)
|
||||||
SVGAQUAKE = $(BIN_PREFIX)-svga
|
SVGAQUAKE = $(BIN_PREFIX)-svga
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAS_GGI),yes)
|
||||||
|
GGIQUAKE = $(BIN_PREFIX)-ggi
|
||||||
|
endif
|
||||||
|
|
||||||
RELEASE = @RELEASE@
|
RELEASE = @RELEASE@
|
||||||
ifeq ($(RELEASE),yes)
|
ifeq ($(RELEASE),yes)
|
||||||
OPTFLAGS = @RELEASE_CFLAGS@
|
OPTFLAGS = @RELEASE_CFLAGS@
|
||||||
|
@ -63,7 +68,7 @@ else
|
||||||
OPTFLAGS = -g
|
OPTFLAGS = -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
targets = $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
|
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE)
|
||||||
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
||||||
.PHONY: $(targets) ($CLEAN_TARGETS)
|
.PHONY: $(targets) ($CLEAN_TARGETS)
|
||||||
|
|
||||||
|
@ -281,6 +286,50 @@ clean-$(SVGAQUAKE):
|
||||||
rm -f $(OBJSquake-svga)
|
rm -f $(OBJSquake-svga)
|
||||||
endif
|
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
|
# quake-gl
|
||||||
|
|
|
@ -109,8 +109,6 @@ Draw_Init
|
||||||
*/
|
*/
|
||||||
void Draw_Init (void)
|
void Draw_Init (void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
draw_chars = W_GetLumpName ("conchars");
|
draw_chars = W_GetLumpName ("conchars");
|
||||||
draw_disc = W_GetLumpName ("disc");
|
draw_disc = W_GetLumpName ("disc");
|
||||||
draw_backtile = W_GetLumpName ("backtile");
|
draw_backtile = W_GetLumpName ("backtile");
|
||||||
|
@ -554,6 +552,9 @@ void Draw_ConsoleBackground (int lines)
|
||||||
#elif defined(X11)
|
#elif defined(X11)
|
||||||
sprintf (ver, "QuakeForge (X11 UQuake) v%s" VERSION);
|
sprintf (ver, "QuakeForge (X11 UQuake) v%s" VERSION);
|
||||||
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
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__)
|
#elif defined(__linux__)
|
||||||
sprintf (ver, "QuakeForge (Linux UQuake) v%s" VERSION);
|
sprintf (ver, "QuakeForge (Linux UQuake) v%s" VERSION);
|
||||||
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||||
|
|
Loading…
Reference in a new issue