aboutsummaryrefslogtreecommitdiff
path: root/butl/buildfile
blob: 8a86b2c6d27fbfe1524e21a497848c3b53f168fe (plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# file      : butl/buildfile
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

lib{butl}:                                  \
   {hxx         cxx}{ base64              } \
   {hxx         cxx}{ char-scanner        } \
   {hxx            }{ const-ptr           } \
   {hxx ixx txx cxx}{ curl                } \
   {hxx         cxx}{ diagnostics         } \
   {hxx            }{ export              } \
   {hxx ixx     cxx}{ fdstream            } \
   {hxx ixx     cxx}{ filesystem          } \
   {hxx            }{ manifest-forward    } \
   {hxx         cxx}{ manifest-parser     } \
   {hxx         cxx}{ manifest-serializer } \
   {hxx            }{ multi-index         } \
   {hxx            }{ optional            } \
   {hxx         cxx}{ pager               } \
   {hxx ixx txx cxx}{ path                } \
   {hxx            }{ path-io             } \
   {hxx            }{ path-map            } \
   {hxx     txx    }{ prefix-map          } \
   {hxx ixx     cxx}{ process             } \
   {hxx            }{ process-details     } \
   {hxx            }{ process-io          } \
   {        txx cxx}{ process-run         } \
   {hxx ixx     cxx}{ sendmail            } \
   {hxx         cxx}{ sha256              } \
   {hxx            }{ small-vector        } \
   {hxx ixx     cxx}{ standard-version    } \
   {hxx         cxx}{ string-parser       } \
   {hxx     txx    }{ string-table        } \
   {hxx         cxx}{ tab-parser          } \
   {hxx         cxx}{ target-triplet      } \
   {hxx         cxx}{ timestamp           } \
   {hxx ixx     cxx}{ utility             } \
   {hxx            }{ vector-view         } \
   {hxx            }{ version             } \
ft/{hxx            }{ exception           } \
ft/{hxx            }{ lang                } \
ft/{hxx            }{ shared_mutex        }

# Exclude these from compilation on non-Windows targets.
#
if ($cxx.target.class == "windows")
  lib{butl}: {hxx         cxx}{ win32-utility }
else
  lib{butl}: file{ win32-utility. win32-utility.cxx }

# This one is included into sha256.cxx so treat it as file to exclude
# from the compilation.
#
lib{butl}: file{sha256c.c}

# These ones are included into timestamp.cxx so treat them as files to exclude
# from the compilation.
#
lib{butl}: file{strptime.c timelocal.h timelocal.c}

hxx{version}: in{version} $src_root/file{manifest}
hxx{version}: dist = true

# For pre-releases use the complete version to make sure they cannot be used
# in place of another pre-release or the final version.
#
if $version.pre_release
  lib{butl}: bin.lib.version = @"-$version.project_id"
else
  lib{butl}: bin.lib.version = @"-$version.major.$version.minor"

cxx.poptions =+ "-I$src_root"
obja{*}: cxx.poptions += -DLIBBUTL_STATIC_BUILD
objs{*}: cxx.poptions += -DLIBBUTL_SHARED_BUILD

lib{butl}: cxx.export.poptions = "-I$src_root"
liba{butl}: cxx.export.poptions += -DLIBBUTL_STATIC
libs{butl}: cxx.export.poptions += -DLIBBUTL_SHARED

if ($cxx.target.class != "windows")
  cxx.libs += -lpthread

# Install into the butl/ subdirectory of, say, /usr/include/.
#
install.include = $install.include/butl/
install.include.subdirs = true # Recreate subdirectories.