aboutsummaryrefslogtreecommitdiff
path: root/support/make/header.mk
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-14 23:43:48 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-14 23:43:48 -0400
commitbe75a466b7048b8a4024714f78e65a9b3f1a8836 (patch)
tree24d8e5a044bb755918f93dacd98b49c46b2188af /support/make/header.mk
parentfece8e83b080249f0f7a51c1dbb067c1fe8f55b8 (diff)
Tweak build system to allow out-of-tree projects.
It's very annoying to have to build libmaple projects in-tree. Users are just copying the repository everywhere. That's stupid. So I made this: https://github.com/mbolivar/example-libmaple-project It needs these patches to work. Add a header and footer for rules.mk files, so we can change them around and things will continue to work for the users, who just include them. In Makefile, add USER_MODULES to LIBMAPLE_MODULES if it's nonempty. This is the hook you use to get your code compiled and linked correctly. Hack build-targets.mk for stupid reasons I hope to fix later. For now, you'll need an empty main.cpp in BOTH the libmaple directory and your directory if you want things to work the way you'd expect. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'support/make/header.mk')
-rw-r--r--support/make/header.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/make/header.mk b/support/make/header.mk
new file mode 100644
index 0000000..c85594a
--- /dev/null
+++ b/support/make/header.mk
@@ -0,0 +1,4 @@
+sp := $(sp).x
+dirstack_$(sp) := $(d)
+d := $(dir)
+BUILDDIRS += $(BUILD_PATH)/$(d)