diff --git a/Makefile.am b/Makefile.am index 181ffdb51..1064f7cd8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/acconfig.h b/acconfig.h index ea1893c0e..bea917394 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 diff --git a/configure.ac b/configure.ac index a9a12e5f2..edf858595 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/cs-code/.gitignore b/cs-code/.gitignore index b03ea778e..c1a4ff852 100644 --- a/cs-code/.gitignore +++ b/cs-code/.gitignore @@ -1,4 +1,6 @@ *.dat *.h +*.src *.sym .vimrc +Makefile.in diff --git a/cs-code/Makefile b/cs-code/Makefile deleted file mode 100644 index 6b872b02f..000000000 --- a/cs-code/Makefile +++ /dev/null @@ -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 diff --git a/cs-code/Makefile.am b/cs-code/Makefile.am new file mode 100644 index 000000000..a4d14e8be --- /dev/null +++ b/cs-code/Makefile.am @@ -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 diff --git a/cs-code/menu.src b/cs-code/menu.src deleted file mode 100644 index 83f1aadc0..000000000 --- a/cs-code/menu.src +++ /dev/null @@ -1,3 +0,0 @@ -menu.dat - -menu.qc diff --git a/cs-code/menu.src.in b/cs-code/menu.src.in new file mode 100644 index 000000000..b98217ce0 --- /dev/null +++ b/cs-code/menu.src.in @@ -0,0 +1,3 @@ +menu.dat + +@srcdir@/menu.qc diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1 @@ +Makefile.in diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 000000000..55e6fa4f5 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1 @@ +SUBDIRS=qfcc diff --git a/tools/qfcc/bootstrap b/tools/qfcc/bootstrap index 3115aa7bf..071d87a77 100755 --- a/tools/qfcc/bootstrap +++ b/tools/qfcc/bootstrap @@ -1,2 +1,3 @@ #!/bin/sh +cd `dirname $0` aclocal && autoheader && automake --add-missing && autoconf diff --git a/tools/qfcc/configure.in b/tools/qfcc/configure.in index 816639411..4474586f1 100644 --- a/tools/qfcc/configure.in +++ b/tools/qfcc/configure.in @@ -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 diff --git a/tools/qfcc/source/Makefile.am b/tools/qfcc/source/Makefile.am index 2679b0258..cd28c1f77 100644 --- a/tools/qfcc/source/Makefile.am +++ b/tools/qfcc/source/Makefile.am @@ -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)