blob: 93b714456fac4e1d44076a61146e2ecf06f334dd [file] [log] [blame]
Matthias Andreas Benkardf59e0972018-04-10 22:01:34 +02001# For detailed information on using, building, and modifying Weld, please visit:
2# http://www.agottem.com/weld
3
4# This is a template for a C or C++ component definition. These component definitions
5# should have the following layout:
6# ./
7# def.mk
8# source/
9# source1.c
10# source2.c
11# include/
12# header1.h
13# header2.h
14# resource/
15# resource1.blaz
16
17# Specify the name of the component definition. This name must be unique throughout
18# the source tree
19name := my_name
20
21# Specify the type of component. May be one of:
22# lib -- build static library
23# bin -- build a binary
24# The name of the build produced build artifact will be derived from the specified
25# name of the component
26type := lib
27
28# Specify the language the component source is written in. May be one of:
29# c -- compile as c99
30# cpp -- compile as c++11
31lang := c
32
33# Optionally specify source files should live in "src/" instead of "source/"
34def_source_subdir := src
35
36# Optionally specify headers live in "inc/" instead of "include/"
37def_include_subdir := include
38
39# Optionally specify resources live in "res/" instead of "resource/"
40def_resource_subdir := res
41
42# Specify a list of headers to make available to other components. These headers
43# should exist in the include/ directory of the component.
44#
45# Each specified header will be copied to the build path as
46# <build_path>/include/<name>/file.h. Other components may include these files by
47# using #include <name/file.h>
48header_list := file.h bar.h blaz.h
49
50# Specify a list of source files to build for this component. These source
51# files should exist in the source/ directory of the component.
52source_list := file.c bar.c blaz.c fun.c help.c private.c
53
54# Specify a lsit of resource files to copy to bin directory of the build path.
55# These resource files should exist in the resource/ directory of the component.
56resource_list := img/cat.jpg img/another_cat.jpg text/help.txt
57
58
59# Specify a list of preprocessor definitions to set during the compilation.
60definition_list := BUILD_COMPONENT=$(name) ENABLE_THIS_FEATURE
61
62
63# Specify explicit include paths to use during compilation
64include_path_list := /some/other/include
65
66
67# Specify a list of libraries this component should link against. These libraries
68# should be libraries which are part of the source tree and can be built. Only
69# the library name should be specified.
70source_lib_list := my_foo_lib my_bar_lib
71
72# Specify a list of external libraries this component should link against. These
73# libraries should exist outside of the source tree. Typically system libraries or
74# third party libraries are set here. The toolchain will select the most
75# appropriate option, which may be a shared or static library
76lib_list := GL glut
77
78# Specify a list of external libraries this component should link against. These
79# libraries should exist outside of the source tree. Typically system libraries or
80# third party libraries are set here. A static version of the library must be
81# available for linking
82static_lib_list := ssl
83
84# Specify a list of library paths to use during the compilation of this component
85lib_path_list := /some/other/lib
86
87
88# Specify compiler flags to use for the components compilation
89compiler_flag_list := -Wno-crappy-warnings
90
91# Specify linker flags to use for this components compilation
92link_flag_list := -Wl,foobar
93
94# Specify additional dependencies build artifacts should have
95def_deps := /my/global/dep