1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-12 06:35:08 +02:00

Add a Makefile for bsdiff

This commit is contained in:
Eelco Dolstra 2013-11-25 11:39:21 +00:00
parent 784feb6839
commit 1a1d8b073a
4 changed files with 18 additions and 2 deletions

View file

@ -13,7 +13,8 @@ programs_list :=
#
# - $(1)_LDFLAGS: additional linker flags.
#
# - bindir: the directory where the program will be installed.
# - $(1)_INSTALL_DIR: the directory where the program will be
# installed; defaults to $(bindir).
define build-program =
_d := $$($(1)_DIR)
_srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src))
@ -24,7 +25,7 @@ define build-program =
$$($(1)_PATH): $$($(1)_OBJS) $$(_libs)
$(QUIET) $(CXX) -o $$@ $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
$(1)_INSTALL_DIR := $$(bindir)
$(1)_INSTALL_DIR ?= $$(bindir)
$(1)_INSTALL_PATH := $$($(1)_INSTALL_DIR)/$(1)
$$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))