-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbob.cfg
155 lines (137 loc) · 5.53 KB
/
bob.cfg
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
###############################################################################
# Example bob configuration file.
#
# Used by 'bob-config' to establish a build directory, from which a 'bob'
# command will build your project.
#
# This file should be located at the top level of a repository, below which
# are source directories.
#
# Before running bob-config, you need to:
# * Check out the project's source repository(s).
# * Ensure that all the project's external dependencies are available,
# either in standard system locations or in local project-specific
# locations.
# Bob does not verify external dependencies.
#
# If your project is built for a number of target architectures, use
# one config file for each architecture, and specify which one on the bob-config
# command-line.
#
###############################################################################
#
# Top-level syntax is a series of sections, each starting with a line:
# [section-name]
#
# Comment lines begin with '#'.
#
# The syntax for each section is section-specific, and described in each
# section.
#
###############################################################################
[defines]
# Define variables.
#
# Any relative paths provided in variable definitions are relative to
# the directory this file is in, which is also the working directory
# of bob-config.
#
# A variable definition is: name = text
#
# Variables used by bob are:
#
# PROJECT - Path to directory containing the project's top-level Bobfile.
# REPOS - Paths to other repos (if any), below which are source
# directories that are available to build as part of this project.
# SYS_INC - Non-standard paths searched for system includes.
# SYS_LIB - Non-standard paths searched for system libraries.
# SYS_PATH - Non-standard paths searched for system utilities.
# SYS_IMP - Non-standard paths searched for D imports.
# C_EXTERN - Top-level C/C++ packages that are external to the project.
# D_EXTERN - Top-level D packages that are external to the project.
#
# Also required are build commands.
#
# Build-command variables are used by bob to create the output files specified
# in the project's Bobfile(s). They are of the form:
# <input-ext> <output-ext>(s) = command
# Reserved extensions with special meaning are:
# .obj -> object file
# .slib -> static library
# .dlib -> dynamic library
# .exe -> executable
# The extensions actually used vary with platform.
# Libraries and executables are built from object files.
#
# The commands that use object files to create libraries and executables are
# specified with the extension of the source files, not .obj.
# .c source files may be mixed with other types of source files,
# but others may not. .h files are assumed to be header files.
#
# Reserved variables defined by bob from information in Bobfiles are:
#
# INPUT - Paths of the input file(s) relative to the build dir.
# OUTPUT - Paths of the resultant built file(s) relative to the build dir.
# PROJ_INC - Project include or import paths.
# PROJ_LIB - Project library paths.
# LIBS - Required libraries.
#
# ${} expands a variable, cross-multiplying it with whatever it is adjacent to.
# eg, if HEADERS = one two three, then -I${HEADERS} becomes -Ione -Itwo -Ithree.
# If the variable is empty, the cross-multiplication is also empty.
# If there is no adjacent text, the variable's value is used.
# Variable expansion occurs just before a build command is issued, after
# all dependencies are known.
# Required
PROJECT = doodle
REPOS =
SYS_IMP =
SYS_INC =
SYS_LIB =
SYS_PATH =
# Compiler switches
CFLAGS = -fpic -pedantic -Wextra -Wall -Wno-long-long -Wundef -Wredundant-decls -DFILE_PATH=${INPUT} -isystem/usr/include/cairo -isystem/usr/include/freetype2
CXXFLAGS = ${CFLAGS} -std=c++11 -Woverloaded-virtual -Wsign-promo -Wctor-dtor-privacy -Wnon-virtual-dtor
DFLAGS = -w -wi -I/home/dbryant/source/d/GtkD.git-bagnose/src
LINKFLAGS =
DLINKFLAGS =
#CC = gcc
#CXX = g++
CC = clang
CXX = clang++
# Build commands
# Documentation
.rst .html = rst2html.py ${INPUT} ${OUTPUT}
# Object files
.c .obj = ${CC} -c ${INPUT} -isystem${SYS_INC} -iquote${PROJ_INC} ${CFLAGS} -o ${OUTPUT}
.cxx .obj = ${CXX} -c ${INPUT} -isystem${SYS_INC} -iquote${PROJ_INC} ${CXXFLAGS} -o ${OUTPUT}
.d .obj = dmd -c ${INPUT} -I${SYS_IMP} -I${PROJ_INC} ${DFLAGS} -of${OUTPUT}
# Static libraries
.c .slib = rm -f ${OUTPUT} && ar csr ${OUTPUT} ${INPUT}
.cxx .slib = rm -f ${OUTPUT} && ar csr ${OUTPUT} ${INPUT}
.d .slib = rm -f ${OUTPUT} && ar csr ${OUTPUT} ${INPUT}
# Dynamic libraries
.c .dlib = ${CC} -shared ${INPUT} ${LINKFLAGS} -L${SYS_LIB} -L${PROJ_LIB} -l${LIBS} -o ${OUTPUT}
.cxx .dlib = ${CXX} -shared ${INPUT} ${LINKFLAGS} -L${SYS_LIB} -L${PROJ_LIB} -l${LIBS} -o ${OUTPUT}
# Executables
.c .exe = ${CC} ${INPUT} ${LINKFLAGS} -L${SYS_LIB} -L${PROJ_LIB} -l${LIBS} -o ${OUTPUT}
.cxx .exe = ${CXX} ${INPUT} ${LINKFLAGS} -L${SYS_LIB} -L${PROJ_LIB} -l${LIBS} -o ${OUTPUT}
.d .exe = dmd ${INPUT} ${DLINKFLAGS} -L-L${SYS_LIB} -L-L${PROJ_LIB} -L-l${LIBS} -of${OUTPUT}
[modes]
# For each mode, add to already-defined variables.
# Format of a mode is: the name of the mode, followed by indented
# variable additions. eg:
#
# debug
# CFLAGS += ggdb3
#
# Exactly one mode is in use for a given build directory, and is specified
# on the bob-config command line. eg: mode=debug
debug
CFLAGS += -O0 -ggdb3
DFLAGS += -gc
release
CFLAGS += -O2 -NDEBUG
DFLAGS += -O -release
[syslibs]
dl gtkd-2 = cairo gtk gtkc gdk glib