build system
Jamie Wilkinson
jaq at spacepants.org
Mon Sep 5 03:33:09 EDT 2005
I'm pretty sure that the make-based build is the deprecated build; as such
I've tried to merge in the changes that ludwig did early on for x86_64
into the Conscript; I havne't checked all the commits on makefiles yet, but
with this patch it should get rolling: makes the top-level makefile call
cons instead for the release and debug build, and fixes up some cflags.
Also works around a bug on Ubuntu where /lib/libc.so.6 isn't executable for
the config stage, which ttimo used to work out the library version linked
against.
My intended goal with this is to port all the makefile changes to cons, and
standardise on cons (with the exception of lcc for now) leaving only a
courtesy makefile at the top for people who expect to type make in the tree
root. Secondly to work out whether cons supports Visual Studio project
targets as SCons does, and if not, port the build system to SCons, which has
the following two advantages over cons: it is actively maintained, and it's
not perl :)
What do you guys think, does that sound like a worthwhile goal for icculus?
-------------- next part --------------
Index: code/Construct
===================================================================
--- code/Construct (revision 84)
+++ code/Construct (working copy)
@@ -63,7 +63,11 @@
else
{
# libc .. do the little magic!
+ if ( -x '/lib/libc.so.6' ) {
$libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3';
+ } else {
+ $libc_cmd = 'nm -D /lib/libc.so.6 | grep GLIBC_ | grep -v PRIVATE | tail -n 1 | cut -f2 -d_';
+ }
$libc = `$libc_cmd`;
chop ($libc);
}
@@ -227,17 +231,17 @@
# build the config directory
$CONFIG_DIR = $config . '-' . $cpu . '-' . $OS . '-' . $libc;
-$COMMON_CFLAGS = '-pipe ';
+$COMMON_CFLAGS = '-pipe -Wall '; # XXX: -Werror is good for the soul
if ($config eq 'debug')
{
# use -Werror for better QA
- $BASE_CFLAGS = $COMMON_CFLAGS . '-g -Wall -O0 ';
+ $BASE_CFLAGS = $COMMON_CFLAGS . '-g -O0 ';
$BSPC_BASE_CFLAGS = $COMMON_CFLAGS . '-g -O0 -DLINUX -DBSPC -Dstricmp=strcasecmp ';
}
else
{
- $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O3 -march=i686 -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
+ $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O3 -march=i686 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
$BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp ';
}
Index: Makefile
===================================================================
--- Makefile (revision 84)
+++ Makefile (working copy)
@@ -1,8 +1,11 @@
VERSION=1.33_SVN$(shell LANG=C svnversion .)
-release debug clean:
- $(MAKE) -C code/unix $@
+release debug:
+ cd code && unix/cons -- $@
+clean:
+ $(MAKE) -C code/unix clean
+
dist:
rm -rf quake3-$(VERSION)
svn export . quake3-$(VERSION)
More information about the quake3
mailing list