[Libclc-developers] An ANSI C build system?
Status: Planning
Brought to you by:
augestad
From: <bo...@me...> - 2003-05-05 21:16:55
|
We cannot seem to settle on one way of building libclc on the users machine; some like autoconf/automake, some hate it. Others would prefer just a simple Makefile, but we don't even know if make is present. Both autoconf and Makefiles would probably be unknown concepts to many Windows users, who's probably more used to Projects and workspaces. Here's an idea for yet another way of building libclc. Please comment. First of all, we cannot assume much about the machine which will be used. One thing we probably can assume is that there is a C compiler present. ;-) The idea is that we write a program in ANSI C and distribute it with libclc. That program, called clcmake, is first compiled and then executed by the user. Phase one, compilation: Bjorn Reese has documented in an excellent way the different macros defined when compiling on different OS'es using different compilers. That documentation is available at http://predef.sourceforge.net/. The source code of clcmake uses these macros to detect OS and compiler. Phase two, execution: Now clcmake knows the operating system as well as the compiler in use. This knowledge combined with a small text-based database should be sufficient to compile libclc. The database would be read by clcmake and contain info about the platforms, compilers, archivers. system() will be used to compile the source code. So the build instructions for libclc can then be: 1. Compile and link clcmake.c (cc -o clcmake clcmake.c) 2. run clcmake That should be simple enough for everyone, shouldn't it? The concept can be extended to handling installation of libclc as well. What do you think? Will it work on "all" platforms? Most importantly, do you *like* it? If you don't, please let me know so that we don't waste lots of time on something that won't be used. TIA for all comments/questions/ideas. -- boa libclc home: http://libclc.sourceforge.net |