about summary refs log tree commit diff
path: root/programs.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-05T12·17+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-05T12·17+0200
commit075cfe3b97bf0e90577bb7e842ba467524fad0ef (patch)
treed6675899455abe1472c260feb0e7584ab8f9804a /programs.mk
parentafbdd5533448724aaf32b434fda8478ad5d80a0f (diff)
Add support for using a build directory
Diffstat (limited to 'programs.mk')
-rw-r--r--programs.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/programs.mk b/programs.mk
index 72afdf95251b..3ac64494e3a5 100644
--- a/programs.mk
+++ b/programs.mk
@@ -23,9 +23,9 @@ programs-list :=
 # - $(1)_INSTALL_DIR: the directory where the program will be
 #   installed; defaults to $(bindir).
 define build-program
-  _d := $$($(1)_DIR)
+  _d := $(buildprefix)$$($(1)_DIR)
   _srcs := $$(sort $$(foreach src, $$($(1)_SOURCES), $$(src)))
-  $(1)_OBJS := $$(addsuffix .o, $$(basename $$(_srcs)))
+  $(1)_OBJS := $$(addprefix $(buildprefix), $$(addsuffix .o, $$(basename $$(_srcs))))
   _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
   $(1)_PATH := $$(_d)/$(1)