[AD] Differentiating between platforms

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I have an idea how to solve problems with mixups between different
platforms.

Each platform should have include file in its obj/ directory which
should define platform specific symbol.  When building, compiler will
find this file, because directory will be included with -I switch.
When installed, this file will be included from allegro directory in
system include directory.  All platform specific conditional
compilation should use the platform specific define, not compiler
specific define.

For example

obj/djgpp/alsystem.h:

#define ALLEGRO_DJGPP 1

include/allegro/alconfig.h:

...
#include "alsystem.h"
...

makefile.dj:

	gcc -Iobj/djgpp ...


I need comments on this issue.  Perhaps, I have not noticed some
obvious problem.

-- 
Michael Bukin



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/