scary, but the only changes qfcc needed to build as part of quakeforge was

to auto-substitued the libs and headers.

 o  unconditionally build qfcc (for now, anyway) when building quakeforge
    (needed for cs-code compilation)
 o  when built as part of quakeforge (qfcc should still be buildable
    independently) always enable cpp
 o  autoconfiscate the client-side code
 o  build the client-side code using the built qfcc
 o  install the client-side code in $(datadir)/quakeforge/id1
This commit is contained in:
Bill Currie 2002-01-22 05:48:03 +00:00
parent d936d5d1d5
commit 8a24b28d97
13 changed files with 73 additions and 13 deletions

View file

@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS= foreign
SUBDIRS= RPM debian doc include libs qw nq
SUBDIRS= RPM debian doc include libs qw nq tools cs-code
## configure.ac needs to be listed here for older autoconfs
EXTRA_DIST= ChangeLog configure.ac \

View file

@ -153,6 +153,15 @@
#undef SND_RENDER_LIST
#undef SND_RENDER_PROTOS
/* Define this to your operating system's path separator character */
#undef PATH_SEPARATOR
/* Define this if you want to use the C preprocessor */
#undef USE_CPP
/* Define this to the command line for the C preprocessor */
#undef CPP_NAME
#if defined (WIN32) && !defined(_WIN32)
# define _WIN32
#endif

View file

@ -1716,6 +1716,18 @@ AC_SUBST(VID_REND_TARGETS)
AC_SUBST(VID_REND_NOINST_TARGETS)
AC_SUBST(VID_TARGETS)
QFCC_LIBS='$(top_builddir)/libs/gamecode/engine/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la'
QFCC_DEPS="${QFCC_LIBS}"
QFCC_INCS='-I$(top_srcdir)/tools/qfcc/include'
AC_SUBST(QFCC_LIBS)
AC_SUBST(QFCC_DEPS)
AC_SUBST(QFCC_INCS)
AC_DEFINE_UNQUOTED(PATH_SEPARATOR, '/')
CPP_NAME=$ac_cv_prog_CPP
AC_DEFINE_UNQUOTED(CPP_NAME, "$CPP_NAME")
AC_DEFINE(USE_CPP)
AM_CONDITIONAL(BUILD_GL, test "$BUILD_GL" = "yes")
AM_CONDITIONAL(BUILD_SW, test "$BUILD_SW" = "yes")
AM_CONDITIONAL(BUILD_SW_ASM, test "$BUILD_SW" = "yes" -a "$ASM_ARCH" = "yes")
@ -1773,6 +1785,16 @@ AC_OUTPUT(
nq/include/Makefile
nq/source/Makefile
tools/Makefile
tools/qfcc/Makefile
tools/qfcc/doc/Makefile
tools/qfcc/doc/man/Makefile
tools/qfcc/include/Makefile
tools/qfcc/source/Makefile
cs-code/Makefile
cs-code/menu.src
doc/Makefile
doc/man/Makefile

2
cs-code/.gitignore vendored
View file

@ -1,4 +1,6 @@
*.dat
*.h
*.src
*.sym
.vimrc
Makefile.in

View file

@ -1,7 +0,0 @@
all: menu.dat
menu.dat: menu.src menu.qc
qfcc -g -I../include -P menu.src
clean:
rm -f core *.dat *.h *.sym

18
cs-code/Makefile.am Normal file
View file

@ -0,0 +1,18 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS= foreign
#FIXME should qf data be installed somewhere other than id1 that gets
#searched after everything else?
pkgdatadir=$(datadir)/quakeforge/id1
QFCC=$(top_builddir)/tools/qfcc/source/qfcc
QCFLAGS=-g
QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include
pkgdata_DATA= menu.dat
menu.dat: menu.src menu.qc
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -P $<
EXTRA_DIST=
CLEANFILES= *.dat *.sym

View file

@ -1,3 +0,0 @@
menu.dat
menu.qc

3
cs-code/menu.src.in Normal file
View file

@ -0,0 +1,3 @@
menu.dat
@srcdir@/menu.qc

1
tools/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
Makefile.in

1
tools/Makefile.am Normal file
View file

@ -0,0 +1 @@
SUBDIRS=qfcc

View file

@ -1,2 +1,3 @@
#!/bin/sh
cd `dirname $0`
aclocal && autoheader && automake --add-missing && autoconf

View file

@ -103,6 +103,10 @@ if test "x$HAVE_QF" != xno; then
)
fi
QFCC_LIBS="-lQFgamecode -lQFutil"
QFCC_DEPS=""
QFCC_INCS=""
AC_ARG_ENABLE(cpp,
[ --enable-cpp Enable use of the C preprocessor.],
AC_DEFINE(USE_CPP)
@ -115,6 +119,10 @@ if test "x$HAVE_QF" = xno; then
exit 1
fi
AC_SUBST(QFCC_LIBS)
AC_SUBST(QFCC_DEPS)
AC_SUBST(QFCC_INCS)
AC_OUTPUT(
doc/man/Makefile
doc/Makefile

View file

@ -28,10 +28,15 @@
#
AUTOMAKE_OPTIONS= foreign
INCLUDES= -I$(top_srcdir)/include
QFCC_LIBS=@QFCC_LIBS@
QFCC_DEPS=@QFCC_DEPS@
QFCC_INCS=@QFCC_INCS@
INCLUDES= -I$(top_srcdir)/include $(QFCC_INCS)
YFLAGS = -d
bin_PROGRAMS= qfcc
qfcc_SOURCES= cmdlib.c debug.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c qc-parse.y qc-lex.l emit.c expr.c struct.c switch.c getopt.c getopt1.c type.c
qfcc_LDADD= -lQFgamecode -lQFutil
qfcc_LDADD= $(QFCC_LIBS)
qfcc_DEPENDENCIES= $(QFCC_DEPS)