-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jamrules
70 lines (61 loc) · 2.83 KB
/
Jamrules
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
62
63
64
65
66
67
68
69
70
if ! $(BUILDTOP)
{
BUILDTOP = . ;
}
# Include configuration. The value of JAMCONFIG may be overridden by targets
# which recursively invoke 'jam' with a custom configuration file. For
# instance, this is done with the 'msvcgen' target (see CS/mk/msvcgen/Jamfile).
JAMCONFIG ?= $(BUILDTOP)/Jamconfig ;
include $(JAMCONFIG) ;
# When a shared lib is built a macro is defined to signify that; make it CS for CS.
LIBRARY_BUILD_DEFINE_PREFIX = CS ;
# CFLAGS. Don't use FDefines here since Boost Jam doesn't have it, and we have
# not yet included mk/jam/build.jam which provides an emulation layer for
# Boost. We can not include build.jam earlier because these flags need to be
# defined before build.jam is included. :-(
COMPILER.CFLAGS.debug += -DCS_DEBUG ;
COMPILER.CFLAGS.profile += -g3 -pg ;
COMPILER.LFLAGS.profile += -g3 -pg ;
# If the source is an SVN checkout emit an preprocessor macro with the build
# number derived from the SVN rev
if "$(SOURCE_IS_SVN)" = "yes"
{
COMPILER.CFLAGS += "-DCS_VERSION_RCSREV=\$\($(TOP)/bin/rcsrev print\)" ;
}
# Some .rc customizations
WIN32RC.EXTRAHEADER = "#include \"csplatform.h\"
#include \"csver.h\"" ;
WIN32RC.VERSIONNUMBER = "CS_VERSION_NUM_MAJOR,CS_VERSION_NUM_MINOR,CS_VERSION_NUM_RELEASE,CS_VERSION_NUM_BUILD" ;
WIN32RC.VERSIONSTR = "CS_VERSION" ;
# Include CS build rules.
include $(TOP)/mk/jam/build.jam ;
# Some CS-specific customizations of vars
PACKAGE_VERSION_SIGNIFICANT = "$(PACKAGE_VERSION_LIST[1]).$(PACKAGE_VERSION_LIST[2])" ;
APPLICATION_SUFFIX = $(PACKAGE_VERSION_SIGNIFICANT) ;
appdatadir = [ ConcatDirs $(datadir) $(PACKAGE_NAME)-$(PACKAGE_VERSION_SIGNIFICANT) ] ;
appconfdir = [ ConcatDirs $(sysconfdir) $(PACKAGE_NAME)-$(PACKAGE_VERSION_SIGNIFICANT) ] ;
appincdir = [ ConcatDirs $(includedir) $(PACKAGE_NAME)-$(PACKAGE_VERSION_SIGNIFICANT) ] ;
plugindir = [ ConcatDirs $(libdir) $(PACKAGE_NAME)-$(PACKAGE_VERSION_SIGNIFICANT) ] ;
# Set up default application icon.
ApplicationIconDefault win32 : gui : cs1.ico : $(TOP) libs csutil win32 ;
ApplicationIconDefault macosx : gui : appicon.icns :
$(TOP) libs csutil macosx ;
# Unit-testing boilerplate: The code we want inserted into each test case and
# the main driver program.
UNITTEST_BOILERPLATE_TEST_PRE = "
#include \"cssysdef.h\"
#include \"csutil/scf.h\"
" ;
UNITTEST_BOILERPLATE_MAIN_PRE = $(UNITTEST_BOILERPLATE_TEST_PRE) "
CS_IMPLEMENT_APPLICATION
" ;
# Set up a property which clients can query to determine if the build directory
# differs from source directory. This allows clients to perform conditional
# actions based upon this knowledge. We safely detect if the two directories
# differ by checking if 'cssysdef.h' is present in $(BUILDTOP)/include. If it
# is not, then the directories differ.
buildheaders = [ GLOB [ ConcatDirs $(BUILDTOP) include ] : *.h ] ;
if ! [ IsElem cssysdef.h : $(buildheaders:BS) ]
{
SetProperty build : standalone ;
}