Add a Makefile for bsdiff
This commit is contained in:
parent
784feb6839
commit
1a1d8b073a
4 changed files with 18 additions and 2 deletions
|
@ -9,6 +9,7 @@ OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
|
bsddiff_compat_include = @bsddiff_compat_include@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
|
|
@ -10,6 +10,7 @@ SUBS = \
|
||||||
src/nix-env/Makefile.new \
|
src/nix-env/Makefile.new \
|
||||||
src/nix-daemon/Makefile.new \
|
src/nix-daemon/Makefile.new \
|
||||||
src/nix-log2xml/Makefile.new \
|
src/nix-log2xml/Makefile.new \
|
||||||
|
src/bsdiff-4.3/Makefile.new \
|
||||||
corepkgs/Makefile.new
|
corepkgs/Makefile.new
|
||||||
|
|
||||||
GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
|
GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
|
||||||
|
|
|
@ -13,7 +13,8 @@ programs_list :=
|
||||||
#
|
#
|
||||||
# - $(1)_LDFLAGS: additional linker flags.
|
# - $(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 =
|
define build-program =
|
||||||
_d := $$($(1)_DIR)
|
_d := $$($(1)_DIR)
|
||||||
_srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src))
|
_srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src))
|
||||||
|
@ -24,7 +25,7 @@ define build-program =
|
||||||
$$($(1)_PATH): $$($(1)_OBJS) $$(_libs)
|
$$($(1)_PATH): $$($(1)_OBJS) $$(_libs)
|
||||||
$(QUIET) $(CXX) -o $$@ $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
|
$(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)
|
$(1)_INSTALL_PATH := $$($(1)_INSTALL_DIR)/$(1)
|
||||||
|
|
||||||
$$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))
|
$$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))
|
||||||
|
|
13
src/bsdiff-4.3/Makefile.new
Normal file
13
src/bsdiff-4.3/Makefile.new
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
PROGRAMS += bsdiff bspatch
|
||||||
|
|
||||||
|
bsdiff_DIR := $(d)
|
||||||
|
bsdiff_SOURCES = bsdiff.c
|
||||||
|
bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include)
|
||||||
|
bsdiff_INSTALL_DIR = $(libexecdir)
|
||||||
|
|
||||||
|
bspatch_DIR := $(d)
|
||||||
|
bspatch_SOURCES = bspatch.c
|
||||||
|
bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include)
|
||||||
|
bspatch_INSTALL_DIR = $(libexecdir)
|
||||||
|
|
||||||
|
dist_files += $(d)/compat-include/*
|
Loading…
Reference in a new issue