1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-25 11:49:35 +01:00

Add support for using a build directory

This commit is contained in:
Eelco Dolstra 2014-09-05 14:17:05 +02:00
parent afbdd55334
commit 075cfe3b97
5 changed files with 21 additions and 8 deletions

View file

@ -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)