File: Construct

package info (click to toggle)
atom4 4.1-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 908 kB
  • sloc: cpp: 4,451; makefile: 25; perl: 6
file content (61 lines) | stat: -rw-r--r-- 1,490 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/cons
#
# Library build script. Requires cons, in case you haven't clued in yet.
# $Id: Construct,v 1.1 2003/03/13 01:15:59 hsteoh Exp hsteoh $
#
# Configurable parameters: (run with 'cons $VARNAME=$VALUE ...')
#
# CC=$binary		C compiler to use (default: gcc)
# CXX=$binary		C++ compiler to use (default: g++)
# ADIR=$dir		Where to install .a files
# INCDIR=$dir		Where to install header files
# SODIR=$dir		Where to install .so files (currently not implemented)
# DEBUG=1		Build with debugging symbols
#
# <obligatory Cons promotion>
# I *love* cons. Make is just an idiotic overly-bandaged contraption way past
# its lifetime. Everyone should use Cons for all new products! It will save
# you countless hours, days, weeks, of endless build frustrations. I swear
# I'll never, ever, use Make again. It's about time it died a long overdue
# death.
# </obligatory Cons promotion>
#

Export qw(
	ADIR INCDIR SODIR
	CONS
);


#
# Externally configurable settings
#

$CC     = $ARG{CC}     || 'gcc';
$CXX    = $ARG{CXX}    || 'g++';
$ADIR   = $ARG{ADIR}   || '#lib';
$INCDIR = $ARG{INCDIR} || '#include';
$SODIR  = $ARG{SODIR}  || '#lib';

#
# Internal setup
#

$DEBUGFLAG = $ARG{DEBUG} ? '-g3' : '';
$CFLAGS = "-pedantic -Wall $DEBUGFLAG";
$CXXFLAGS = "-pedantic -Wall $DEBUGFLAG";
$INCPATHS = "$INCDIR";

$CONS = new cons(
  CC       => $CC,
  CFLAGS   => $CFLAGS,
  CXX      => $CXX,
  CXXFLAGS => $CXXFLAGS,
  CPPPATH  => $INCPATHS
);

Build qw(
  c++/Conscript
  c/Conscript
);