Debian Codegraph @

proglib/Construct

raw
1 #!/usr/bin/cons
2 #
3 # Library build script. Requires cons, in case you haven't clued in yet.
4 # $Id: Construct,v 1.1 2003/03/13 01:15:59 hsteoh Exp hsteoh $
5 #
6 # Configurable parameters: (run with 'cons $VARNAME=$VALUE ...')
7 #
8 # CC=$binary C compiler to use (default: gcc)
9 # CXX=$binary C++ compiler to use (default: g++)
10 # ADIR=$dir Where to install .a files
11 # INCDIR=$dir Where to install header files
12 # SODIR=$dir Where to install .so files (currently not implemented)
13 # DEBUG=1 Build with debugging symbols
14 #
15 # <obligatory Cons promotion>
16 # I *love* cons. Make is just an idiotic overly-bandaged contraption way past
17 # its lifetime. Everyone should use Cons for all new products! It will save
18 # you countless hours, days, weeks, of endless build frustrations. I swear
19 # I'll never, ever, use Make again. It's about time it died a long overdue
20 # death.
21 # </obligatory Cons promotion>
22 #
23
24 Export qw(
25 ADIR INCDIR SODIR
26 CONS
27 );
28
29
30 #
31 # Externally configurable settings
32 #
33
34 $CC = $ARG{CC} || 'gcc';
35 $CXX = $ARG{CXX} || 'g++';
36 $ADIR = $ARG{ADIR} || '#lib';
37 $INCDIR = $ARG{INCDIR} || '#include';
38 $SODIR = $ARG{SODIR} || '#lib';
39
40 #
41 # Internal setup
42 #
43
44 $DEBUGFLAG = $ARG{DEBUG} ? '-g3' : '';
45 $CFLAGS = "-pedantic -Wall $DEBUGFLAG";
46 $CXXFLAGS = "-pedantic -Wall $DEBUGFLAG";
47 $INCPATHS = "$INCDIR";
48
49 $CONS = new cons(
50 CC => $CC,
51 CFLAGS => $CFLAGS,
52 CXX => $CXX,
53 CXXFLAGS => $CXXFLAGS,
54 CPPPATH => $INCPATHS
55 );
56
57 Build qw(
58 c++/Conscript
59 c/Conscript
60 );
61