* Moved qcommon/ into src/ as well.

* Removed ARCH from compile options, this means that there
  is no longer a game$(ARCH).so built -- game.so instead.
* Added src/Makefile.am
* Fixed up include paths in main.c, menu.c, vid_menu.c,
  vid_so.c
This commit is contained in:
Jamie Wilkinson 2002-04-02 06:23:02 +00:00
parent 460d5d8dfd
commit 8ff1601081
26 changed files with 370 additions and 16 deletions

View file

@ -3,3 +3,4 @@
## Process this file with automake to create Makefile.in
SUBDIRS = src

View file

@ -3,7 +3,7 @@ AC_INIT
AC_PREREQ(2.50)
AM_INIT_AUTOMAKE(quake2, 0.1, quake2-devel@quakeforge.net)
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
@ -58,10 +58,10 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS([bzero floor getcwd gethostbyname getmntent getpagesize gettimeofday memmove memset mkdir munmap pow putenv select socket sqrt strcasecmp strchr strdup strerror strrchr strstr])
AC_CONFIG_FILES([Makefile
src/Makefile
client/Makefile
game/Makefile
server/Makefile
ref_gl/Makefile
ref_soft/Makefile])
src/Makefile])
# client/Makefile
# game/Makefile
# server/Makefile
# ref_gl/Makefile
# ref_soft/Makefile])
AC_OUTPUT

View file

@ -1,2 +1,332 @@
all build_debug build_release:
@echo This makefile is out of date. go up one level.
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# $Id$
# Process this file with automake to create Makefile.in
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/quake2
pkglibdir = $(libdir)/quake2
pkgincludedir = $(includedir)/quake2
top_builddir = ..
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = gcc
MAINT = #
MAKEINFO = makeinfo
PACKAGE = quake2
VERSION = 0.1
bin_PROGRAMS = quake2
quake2_SOURCES = main.c q_sh.c vid_menu.c vid_so.c glob.c net_udp.c cl_cin.c cl_ents.c cl_fx.c cl_input.c cl_inv.c cl_main.c cl_parse.c cl_pred.c cl_tent.c cl_scrn.c cl_view.c cl_newfx.c console.c keys.c menu.c snd_dma.c snd_mem.c snd_mix.c qmenu.c checksum.c cmd.c cmodel.c common.c crc.c cvar.c files.c mdfour.c net_chan.c sv_ccmds.c sv_ents.c sv_game.c sv_init.c sv_main.c sv_user.c sv_world.c q_shared.c pmove.c cd.c snd.c
CPPFLAGS = -Dstricmp=strcasecmp -Wall -Werror -pipe -DLINUX_VERSION=\"$(VERSION)\"
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(bin_PROGRAMS)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
LDFLAGS =
LIBS = -lpthread -lm -ldl -lGL
quake2_OBJECTS = main.o q_sh.o vid_menu.o vid_so.o glob.o net_udp.o \
cl_cin.o cl_ents.o cl_fx.o cl_input.o cl_inv.o cl_main.o cl_parse.o \
cl_pred.o cl_tent.o cl_scrn.o cl_view.o cl_newfx.o console.o keys.o \
menu.o snd_dma.o snd_mem.o snd_mix.o qmenu.o checksum.o cmd.o cmodel.o \
common.o crc.o cvar.o files.o mdfour.o net_chan.o sv_ccmds.o sv_ents.o \
sv_game.o sv_init.o sv_main.o sv_user.o sv_world.o q_shared.o pmove.o \
cd.o snd.o
quake2_LDADD = $(LDADD)
quake2_DEPENDENCIES =
quake2_LDFLAGS =
CFLAGS = -g -O2
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/cd.P .deps/checksum.P .deps/cl_cin.P .deps/cl_ents.P \
.deps/cl_fx.P .deps/cl_input.P .deps/cl_inv.P .deps/cl_main.P \
.deps/cl_newfx.P .deps/cl_parse.P .deps/cl_pred.P .deps/cl_scrn.P \
.deps/cl_tent.P .deps/cl_view.P .deps/cmd.P .deps/cmodel.P \
.deps/common.P .deps/console.P .deps/crc.P .deps/cvar.P .deps/files.P \
.deps/glob.P .deps/keys.P .deps/main.P .deps/mdfour.P .deps/menu.P \
.deps/net_chan.P .deps/net_udp.P .deps/pmove.P .deps/q_sh.P \
.deps/q_shared.P .deps/qmenu.P .deps/snd.P .deps/snd_dma.P \
.deps/snd_mem.P .deps/snd_mix.P .deps/sv_ccmds.P .deps/sv_ents.P \
.deps/sv_game.P .deps/sv_init.P .deps/sv_main.P .deps/sv_user.P \
.deps/sv_world.P .deps/vid_menu.P .deps/vid_so.P
SOURCES = $(quake2_SOURCES)
OBJECTS = $(quake2_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
quake2: $(quake2_OBJECTS) $(quake2_DEPENDENCIES)
@rm -f quake2
$(LINK) $(quake2_LDFLAGS) $(quake2_OBJECTS) $(quake2_LDADD) $(LIBS)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-depend distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
#m_flash.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

24
src/Makefile.am Normal file
View file

@ -0,0 +1,24 @@
# $Id$
# Process this file with automake to create Makefile.in
bin_PROGRAMS = quake2
quake2_SOURCES = main.c q_sh.c vid_menu.c vid_so.c glob.c net_udp.c \
\
cl_cin.c cl_ents.c cl_fx.c cl_input.c cl_inv.c \
cl_main.c cl_parse.c cl_pred.c cl_tent.c cl_scrn.c cl_view.c \
cl_newfx.c console.c keys.c menu.c snd_dma.c snd_mem.c \
snd_mix.c qmenu.c \
\
checksum.c cmd.c cmodel.c common.c crc.c cvar.c files.c \
mdfour.c net_chan.c \
\
sv_ccmds.c sv_ents.c sv_game.c sv_init.c sv_main.c \
sv_user.c sv_world.c \
\
q_shared.c pmove.c \
\
cd.c snd.c
#m_flash.c
CPPFLAGS = -Dstricmp=strcasecmp -Wall -Werror -pipe -DLINUX_VERSION=\"$(VERSION)\"

View file

@ -61,7 +61,7 @@
#define dlsym(X, Y) dlsym(X, "_"##Y)
#endif
#include "../qcommon/qcommon.h"
#include "qcommon.h"
#include "../game/game.h"
#include "rw.h"
@ -244,7 +244,7 @@ void *Sys_GetGameAPI (void *parms)
/* relnev 0.9 added -- jaq */
FILE * fp;
const char * gamename = "game"ARCH".so";
const char * gamename = "game.so";
setreuid(getuid(), getuid());
setegid(getgid());

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <io.h>
#endif
#include "client.h"
#include "../client/qmenu.h"
#include "qmenu.h"
static int m_main_cursor;

View file

@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "../client/client.h"
#include "../client/qmenu.h"
#include "client.h"
#include "qmenu.h"
/* irix/vid_menu.c defines only REF_SOFT and REF_OPENGL, we'll use REF_GLX */
#define REF_SOFT 0

View file

@ -47,8 +47,7 @@
#define dlsym(X, Y) dlsym(X, "_"##Y)
#endif
#include "../client/client.h"
#include "client.h"
#include "rw.h"
// Structure containing functions exported from refresh DLL