- added initial support for glx build

- included nvparse library code (build still broken)
This commit is contained in:
faded 2003-03-05 02:27:25 +00:00
parent 4c17b581f0
commit 087a6ad88f
2 changed files with 307 additions and 203 deletions

View file

@ -1,15 +1,42 @@
bin_PROGRAMS = tenebrae.sdl
if HAVE_SDL
SDL_PRG = tenebrae.sdl
else
SDL_PRG =
endif
tenebrae_sdl_LDADD = @MATHLIB@ @INETLIB@ @OPENGLLIBS@
bin_PROGRAMS = $(SDL_PRG) tenebrae.glx
tenebrae_glx_LDADD = @MATLIB@ @INETLIB@ @X11_LIBS@ @OPENGLLIBS@
tenebrae_sdl_LDADD = @MATHLIB@ @INETLIB@ @SDL_LIBS@ @OPENGLLIBS@
MASTER_DIR=..
# datadir is a variable defined by autoconf to @prefix@/share/
tenebrae_sdl_CFLAGS = @CFLAGS@ -DGLQUAKE -DBASEDIR=@GAMEDIR@ -I$(MASTER_DIR)
NVPARSE_DIR=$(MASTER_DIR)/nvparse
# datadir is a variable defined by autoconf to @prefix@/share/
tenebrae_glx_CFLAGS = @CFLAGS@ @X11_CFLAGS@ -D__glx__ -DGLQUAKE -DBASEDIR=@GAMEDIR@ -I$(MASTER_DIR) -I$(NVPARSE_DIR)
tenebrae_sdl_CFLAGS = @CFLAGS@ @SDL_CFLAGS@ -DSDL -DGLQUAKE -DBASEDIR=@GAMEDIR@ -I$(MASTER_DIR) -I$(NVPARSE_DIR)
tenebrae_glx_CXXFLAGS = $(tenebrae_glx_CFLAGS)
tenebrae_sdl_CXXFLAGS = $(tenebrae_sdl_CFLAGS)
tenebrae_glx_SOURCES = \
$(MASTER_DIR)/cd_linux.c \
$(MASTER_DIR)/snd_linux. \
$(MASTER_DIR)/sys_linux. \
$(MASTER_DIR)/gl_vidlinuxglx.c \
$(COMMON_SRCS)
tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/cd_sdl.c \
$(MASTER_DIR)/sys_sdl.c \
$(MASTER_DIR)/snd_sdl.c \
$(MASTER_DIR)/gl_vidsdl.c \
$(COMMON_SRCS)
COMMON_SRCS = \
$(MASTER_DIR)/adivtab.h \
$(MASTER_DIR)/anorm_dots.h \
$(MASTER_DIR)/anorms.h \
@ -18,7 +45,6 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/block16.h \
$(MASTER_DIR)/block8.h \
$(MASTER_DIR)/bspfile.h \
$(MASTER_DIR)/cd_sdl.c \
$(MASTER_DIR)/cdaudio.h \
$(MASTER_DIR)/chase.c \
$(MASTER_DIR)/cl_demo.c \
@ -46,8 +72,8 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/keys.h \
$(MASTER_DIR)/mathlib.c \
$(MASTER_DIR)/mathlib.h \
$(MASTER_DIR)/xmlmenu.c \
$(MASTER_DIR)/xmlmenu.h \
$(MASTER_DIR)/menu.c \
$(MASTER_DIR)/menu.h \
$(MASTER_DIR)/modelgen.h \
$(MASTER_DIR)/mpdosock.h \
$(MASTER_DIR)/net.h \
@ -84,7 +110,6 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/snd_dma.c \
$(MASTER_DIR)/snd_mem.c \
$(MASTER_DIR)/snd_mix.c \
$(MASTER_DIR)/snd_sdl.c \
$(MASTER_DIR)/sound.h \
$(MASTER_DIR)/spritegn.h \
$(MASTER_DIR)/sv_main.c \
@ -94,12 +119,10 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/sv_user.c \
$(MASTER_DIR)/sys.h \
$(MASTER_DIR)/sys_uxfindfirst.c \
$(MASTER_DIR)/sys_sdl.c \
$(MASTER_DIR)/te_scripts.c \
$(MASTER_DIR)/te_scripts.h \
$(MASTER_DIR)/vgamodes.h \
$(MASTER_DIR)/vid.h \
$(MASTER_DIR)/gl_vidsdl.c \
$(MASTER_DIR)/view.c \
$(MASTER_DIR)/view.h \
$(MASTER_DIR)/wad.c \
@ -112,7 +135,8 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/textures.c \
$(GL_SRCS) \
$(GL_TENEBRAE_SRCS) \
$(LEX_TENEBRAE_SRCS)
$(LEX_TENEBRAE_SRCS) \
$(NVPARSE_SRCS)
QUAKE_SRCS = \
$(MASTER_DIR)/d_edge.c \
@ -217,9 +241,6 @@ WIN_SRCS = \
$(MASTER_DIR)/vid_win.c
LNX_SRCS = \
$(MASTER_DIR)/cd_linux.c \
$(MASTER_DIR)/snd_linux.c \
$(MASTER_DIR)/sys_linux.c \
$(MASTER_DIR)/vid_svgalib.c \
$(MASTER_DIR)/vid_x.c
@ -279,6 +300,27 @@ GL_TENEBRAE_SRCS = \
LEX_TENEBRAE_SRCS = \
$(MASTER_DIR)/lex_part.l
NVPARSE_SRCS = \
$(NVPARSE_DIR)/nvparse.cpp \
$(NVPARSE_DIR)/nvparse_errors.cpp \
$(NVPARSE_DIR)/rc1.0_combiners.cpp \
$(NVPARSE_DIR)/rc1.0_general.cpp \
$(NVPARSE_DIR)/rc1.0_final.cpp \
$(NVPARSE_DIR)/nvparse_errors.h \
$(NVPARSE_DIR)/nvparse_externs.h \
$(NVPARSE_DIR)/nvparse.h \
$(NVPARSE_DIR)/rc1.0_combiners.h \
$(NVPARSE_DIR)/rc1.0_final.h \
$(NVPARSE_DIR)/rc1.0_general.h \
$(NVPARSE_DIR)/rc1.0_register.h \
$(LEX_NVPARSE_SRCS) \
$(YACC_NVPARSE_SRCS)
LEX_NVPARSE_SRCS = \
$(NVPARSE_DIR)/rc1.0_tokens.ll
YACC_NVPARSE_SRCS = \
$(NVPARSE_DIR)/rc1.0_grammar.yy
EXTRA_DIST = \
$(MASTER_DIR)/sdl/configure.ac \
@ -297,6 +339,24 @@ EXTRA_DIST = \
$(GL_LNX_SRCS) \
$(GL_WIN_SRCS)
dist-hook:
cp -rp $(MASTER_DIR)/win $(MASTER_DIR)/linux $(MASTER_DIR)/macosx $(MASTER_DIR)/dxsdk $(MASTER_DIR)/gas2masm $(distdir)/
# =======================================================
# Rules
# hack to handle the rc1.0_tokens.l lex->cpp file case
$(NVPARSE_DIR)/rc1.0_tokens.ll : $(NVPARSE_DIR)/rc1.0_tokens.l
cp $(NVPARSE_DIR)/rc1.0_tokens.l $(NVPARSE_DIR)/rc1.0_tokens.ll
# hack to handle the rc1.0_grammar.y yacc->cpp file case
$(NVPARSE_DIR)/rc1.0_grammar.yy : $(NVPARSE_DIR)/rc1.0_grammar.y
cp $(NVPARSE_DIR)/rc1.0_grammar.y $(NVPARSE_DIR)/rc1.0_grammar.yy
# distribution misc. files
dist-hook:
cp -rp $(MASTER_DIR)/win $(MASTER_DIR)/linux $(MASTER_DIR)/macosx \
$(MASTER_DIR)/dxsdk $(MASTER_DIR)/gas2masm $(NVPARSE_DIR) $(distdir)/

View file

@ -1,22 +1,27 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(tenebrae, 1.0.2)
# =================================================================
# Detect the canonical target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
# =================================================================
# Checks for sources
AC_CONFIG_SRCDIR([../sys_sdl.c])
AM_CONFIG_HEADER([config.h])
# =================================================================
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# =================================================================
# autoconf 2.53 doesn't check that
# AM_PROG_AS
CCAS="$CC"
@ -25,6 +30,9 @@ AC_SUBST(CCAS)
AC_SUBST(CCASFLAGS)
# =================================================================
# arch compilation tuning
# The alpha architecture needs special flags for binary portability
case "$target" in
@ -34,10 +42,11 @@ case "$target" in
;;
alpha*-*-linux*)
#CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
CFLAGS="$CFLAGS -Wa,-mall"
;;
esac
# =================================================================
# Checks for libraries.
# Figure out which math and networking libraries to use
@ -48,6 +57,7 @@ case "$target" in
OPENGLLIBS="-lopengl32 -lglu32"
;;
*-*-beos*)
AC_MSG_ERROR([BeOS support broken])
MATHLIB=""
INETLIB=""
;;
@ -57,11 +67,24 @@ case "$target" in
OPENGLLIBS="-lGL -lGLU"
;;
esac
AC_SUBST(MATHLIB)
AC_SUBST(INETLIB)
AC_SUBST(OPENGLLIBS)
# Check for lex
# =================================================================
# Check for X11
# FIXME !!!!
X11_LIBS=-L/usr/X11R6/lib -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm
X11_CFLAGS=""
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
# =================================================================
# Check for lex/flex
AM_PROG_LEX
if test "$LEX" != flex; then
@ -74,13 +97,21 @@ LFLAGS="-i -Cfr"
AC_SUBST(LFLAGS)
# =================================================================
# Check for X11
# =================================================================
# Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
[ have_sdl=1 ]
)
AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = x1 )
# =================================================================
# Check for PNG
# FIX-ME : the png version isn't checked for now (don't know if useful though)
PNG_VERSION=1.2.0
@ -99,6 +130,9 @@ fi
AC_SUBST(PNG_CFLAGS)
AC_SUBST(PNG_LIBS)
# =================================================================
# Check for XML2
AC_CHECK_PROG(XML_LIBS,xml2-config,`xml2-config --libs`, )
if test x"$XML_LIBS" = x; then
@ -110,9 +144,11 @@ fi
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
CFLAGS="$CFLAGS $SDL_CFLAGS -DSDL $PNG_CFLAGS $XML_CFLAGS"
LIBS="$LIBS $SDL_LIBS $PNG_LIBS $XML_LIBS"
CFLAGS="$CFLAGS $PNG_CFLAGS $XML_CFLAGS"
LIBS="$LIBS $PNG_LIBS $XML_LIBS"
# =================================================================
# Game data
AC_ARG_VAR(GAMEDIR,
@ -124,6 +160,7 @@ fi
AC_SUBST(GAMEDIR)
# =================================================================
# Enable/disable the i686 asm
AC_ARG_ENABLE(asm,
@ -133,6 +170,7 @@ if test x$enable_asm = xyes; then
CFLAGS="$CFLAGS -DUSE_ASM"
fi
# =================================================================
# Enable/disable user prefs
AC_ARG_ENABLE(userpref,
@ -144,12 +182,14 @@ fi
CFLAGS="$CFLAGS -DELF"
# =================================================================
# Checks for header files.
AC_PATH_X
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h termios.h unistd.h])
# =================================================================
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
@ -157,6 +197,7 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# =================================================================
# Checks for library functions.
AC_FUNC_ALLOCA
AC_PROG_GCC_TRADITIONAL
@ -168,5 +209,8 @@ AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit floor gethostbyaddr gethostbyname gethostname gethrtime getpagesize gettimeofday getwd inet_ntoa memset mkdir munmap pow select socket sqrt strcasecmp strchr strerror strstr])
# =================================================================
# Generate build files
AC_CONFIG_FILES([Makefile])
AC_OUTPUT