Re: [AD] build process overhaul |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
On Monday 26 December 2005 17:32, Jon Rafkind wrote:
Does your build system correctly detect the precense of 64 bit CPU's?
Not really. There is platform.processor() from python but this doesnt
tell you explicitly if you have a 64-bit cpu, it just returns a string
which is the name of the processor like "Pentium III( Copermine )" on my
system. The current checks for an intel cpu, amd cpu, or sparc cpu are
assembly programs hardcoded into the build system. I guess someone could
write checks for 64-bit cpus as well.
There is one in the configure script. Without it Allegro doesn't build
correctly on 64 bit systems.
This works correctly on amd64.
plugins.h isnt used anywhere except for tools/datedit.c and plugins.h
for every platform is just
$ cat tools/plugins/*.inc > plugins.h
so why not just cat them into wherever the tools are going to be built
and do #include "plugins.h" instead of #include "obj/platform/plugins.h"
Why not indeed? Does Anyone know?
I always assumed that there was a good reason for having a plugins.h
sitting in obj/platform/ but now I can't really think of any except for it
being a generated file... which doesn't strike me as much of a reason,
actually.
There are, I suppose, numerous solutions to this problem but I have come
up with the following. Include just "plugins.h" in datedit.c and add
-I$(OBJDIR), which is -Iobj/unix on my system, to the makefile. In the
scons script plugins.h is catted into the builddir, build/release, and
-Ibuild/release is added to the compilation line. Does this seem like a
reasonable solution?
It is sort of ugly to add -Iobj/unix to gcc so plugins.h could just be
generated in tools/ or tools/plugins but then the shell scripts in
allegro/misc would have to change to handle this( something I didnt want
to do ). I guess Ill just attach the patch of what I changed to be
perfectly clear:
Index: tools/datedit.c
===================================================================
--- tools/datedit.c (revision 5589)
+++ tools/datedit.c (working copy)
@@ -103,25 +103,25 @@
AL_CONST char *prop_types;
#if defined ALLEGRO_DJGPP
- #include "obj/djgpp/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_MSVC
- #include "obj/msvc/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_WATCOM
- #include "obj/watcom/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_UNIX
- #include "obj/unix/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_MINGW32
- #include "obj/mingw32/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_BEOS
- #include "obj/beos/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_BCC32
- #include "obj/bcc32/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_MPW
- #include "::obj:mpw:plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_MACOSX
- #include "obj/macosx/plugins.h"
+ #include "plugins.h"
#elif defined ALLEGRO_QNX
- #include "obj/qnx/plugins.h"
+ #include "plugins.h"
#else
#error unknown platform
#endif
Index: makefile.in
===================================================================
--- makefile.in (revision 5589)
+++ makefile.in (working copy)
@@ -57,7 +57,7 @@
CONFIGURE_IN = configure.in
ACLOCAL_M4 = aclocal.m4
-INCLUDES = -I. -Iinclude -Iinclude/allegro -I$(srcdir)/include
-I$(srcdir)/include/allegro
+INCLUDES = -I. -Iinclude -Iinclude/allegro -I$(srcdir)/include
-I$(srcdir)/include/allegro -I$(OBJDIR)
DEFS = @DEFS@
CPPFLAGS = @CPPFLAGS@
override LDFLAGS += @LDFLAGS@