Merge branch 'master' into dmbs
[pub/USBasp.git] / LUFA / Build / DMBS / Readme.md
1 DMBS - Dean's Makefile Build System
2 ===================================
3
4
5 Project Overview
6 ----------------
7
8 GNU Make is scary, and it's tough to get the rules right sometimes. Many
9 projects get by via simple copy-pasting of old makefiles, resulting in many
10 redundant copies of the same old rules. DMBS aims to solve this by providing a
11 simple modular set of makefiles which can be included by your project to quickly
12 add various build functionality.
13
14 This aims to replace the old WinAVR "mfile" makefile template, giving better
15 functionality and much simpler user makefiles.
16
17
18 Benefits:
19 ----------------
20
21 Apart from much simpler, cleaner makefiles DMBS carries the aim of making the
22 process of troubleshooting build issues a little easier. Lots can go wrong, so
23 DMBS tries to sanity check its inputs wherever possible, and produce
24 human-readable error messages. Forgotten to set a variable? Get a
25 `Makefile {X} value not set.` message, rather than a possibly unrelated message.
26 Have the wrong filename? See `Source file does not exist: {X}` rather than the
27 infamous `No rule to make target {X}` message.
28
29
30 Use:
31 ----------------
32
33 A template user makefile is provided in the `Template` directory. DMBS modules
34 are included via a GNU Make `include` directive. While the DMBS `core` module is
35 always required, you can pick and choose what other modules you wish to add to
36 your user project.
37
38 Here's an example user makefile:
39
40 MCU = atmega128
41 ARCH = AVR8
42 F_CPU = 8000000
43 OPTIMIZATION = s
44 TARGET = Template
45 SRC = $(TARGET).c
46 CC_FLAGS =
47 LD_FLAGS =
48
49 # Default target
50 all:
51
52 # Include DMBS build script makefiles
53 DMBS_PATH ?= ../DMBS
54 include $(DMBS_PATH)/core.mk
55 include $(DMBS_PATH)/gcc.mk
56 include $(DMBS_PATH)/cppcheck.mk
57 include $(DMBS_PATH)/doxygen.mk
58 include $(DMBS_PATH)/dfu.mk
59 include $(DMBS_PATH)/hid.mk
60 include $(DMBS_PATH)/avrdude.mk
61 include $(DMBS_PATH)/atprogram.mk
62
63 Each DMBS module can optionally supply one or more Make variables and macros,
64 which you can reference in your user makefile. Additionally, modules can require
65 one or more variables to be set by the user makefile, with (in some cases) sane
66 defaults used if left out.
67
68 As modules are added, you can get a list of available targets by simply typing
69 `make help` from the command line. This will produce a formatted list of targets
70 as well as mandatory and optional variables and exposed variables and macros.
71
72
73 License
74 ----------------
75
76 DMBS is released into the public domain, making is suitable for use everywhere,
77 by everyone. Contributions are greatly appreciated however, in order to make
78 DMBS better for everyone.
79
80 The actual license text is as follows:
81
82 This is free and unencumbered software released into the public domain.
83
84 Anyone is free to copy, modify, publish, use, compile, sell, or
85 distribute this software, either in source code form or as a compiled
86 binary, for any purpose, commercial or non-commercial, and by any
87 means.
88
89 In jurisdictions that recognize copyright laws, the author or authors
90 of this software dedicate any and all copyright interest in the
91 software to the public domain. We make this dedication for the benefit
92 of the public at large and to the detriment of our heirs and
93 successors. We intend this dedication to be an overt act of
94 relinquishment in perpetuity of all present and future rights to this
95 software under copyright law.
96
97 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
98 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
99 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
100 IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
101 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
102 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
103 OTHER DEALINGS IN THE SOFTWARE.
104
105 For more information, please refer to <http://unlicense.org/>