about summary refs log tree commit diff
path: root/mk/programs.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T15·15+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T15·15+0100
commit568b1b0a8a65cb255d6a7a33dfe2c15df3212103 (patch)
treefedfcccea3f25a6079c1f8772b2f33c171eb1a9f /mk/programs.mk
parentbf8b66adcfdc04f2f0f0a482c66dd419a355cad6 (diff)
Remove mk subdirectory in preparation for "git subtree"
Diffstat (limited to 'mk/programs.mk')
-rw-r--r--mk/programs.mk57
1 files changed, 0 insertions, 57 deletions
diff --git a/mk/programs.mk b/mk/programs.mk
deleted file mode 100644
index 648a6053b4c2..000000000000
--- a/mk/programs.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-programs_list :=
-
-# Build a program with symbolic name $(1).  The program is defined by
-# various variables prefixed by ‘$(1)_’:
-#
-# - $(1)_DIR: the directory containing the sources of the program, and
-#   where the (non-installed) program will be placed.
-#
-# - $(1)_SOURCES: the source files of the program.
-#
-# - $(1)_LIBS: the symbolic names of libraries on which this program
-#   depends.
-#
-# - $(1)_LDFLAGS: additional linker flags.
-#
-# - $(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))
-  $(1)_OBJS := $$(addsuffix .o, $$(basename $$(_srcs)))
-  _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
-  $(1)_PATH := $$(_d)/$(1)
-
-  $$($(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_PATH := $$($(1)_INSTALL_DIR)/$(1)
-
-  $$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))
-
-  install: $$($(1)_INSTALL_PATH)
-
-  ifeq ($(BUILD_SHARED_LIBS), 1)
-
-    _libs_final := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_INSTALL_PATH))
-
-    $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $$($(1)_INSTALL_DIR)
-	$(QUIET) $(CXX) -o $$@ $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
-
-  else
-
-    $$($(1)_INSTALL_PATH): $$($(1)_PATH) | $$($(1)_INSTALL_DIR)
-	install -t $$($(1)_INSTALL_DIR) $$<
-
-  endif
-
-  # Propagate CXXFLAGS to the individual object files.
-  $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
-
-  include $$(wildcard $$(_d)/*.dep)
-
-  programs_list += $$($(1)_PATH)
-  clean_files += $$($(1)_PATH) $$(_d)/*.o $$(_d)/*.dep
-  dist_files += $$(_srcs)
-endef