aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-24 00:15:25 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-24 00:17:45 +0100
commit07c87a8e9ef7bd42995230700169c6a18cf26313 (patch)
treed79f8cc7eec0337995156ef5720edc9d669709c0
parentc1f3a1a89b717e73c2a8c2315067c495e246457c (diff)
Consistent naming
-rw-r--r--Makefile.lib20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile.lib b/Makefile.lib
index f5872c88b..16fd20c77 100644
--- a/Makefile.lib
+++ b/Makefile.lib
@@ -54,7 +54,7 @@ define LIBS_template =
_d := $$(strip $$($(1)_DIR))
_srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src))
$(1)_OBJS := $$(addsuffix .o, $$(basename $$(_srcs)))
- _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_NAME))
+ _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
$(1)_LDFLAGS_USE :=
$(1)_LDFLAGS_USE_INSTALLED :=
@@ -65,8 +65,9 @@ define LIBS_template =
$(1)_LDFLAGS += -z defs
endif
- _lib := $$(_d)/$(1).so
- $$(_lib): $$($(1)_OBJS) $$(_libs)
+ $(1)_PATH := $$(_d)/$(1).so
+
+ $$($(1)_PATH): $$($(1)_OBJS) $$(_libs)
$(QUIET) $(CXX) -o $$@ -shared $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
$(1)_LDFLAGS_USE += -L$$(_d) -Wl,-rpath,$$(abspath $$(_d)) -l$$(patsubst lib%,%,$$(strip $(1)))
@@ -85,11 +86,12 @@ define LIBS_template =
else
- _lib := $$(_d)/$(1).a
- $$(_lib): $$($(1)_OBJS)
+ $(1)_PATH := $$(_d)/$(1).a
+
+ $$($(1)_PATH): $$($(1)_OBJS)
$(QUIET) ar crs $$@ $$?
- $(1)_LDFLAGS_USE += $$(_lib) $$($(1)_LDFLAGS)
+ $(1)_LDFLAGS_USE += $$($(1)_PATH) $$($(1)_LDFLAGS)
$(1)_INSTALL_PATH := $$(pkglibdir)/$(1).a
@@ -98,14 +100,12 @@ define LIBS_template =
$(1)_LDFLAGS_USE += $$($(1)_LDFLAGS_PROPAGATED)
$(1)_LDFLAGS_USE_INSTALLED += $$($(1)_LDFLAGS_PROPAGATED)
- $(1)_NAME := $$(_lib)
-
# Propagate CXXFLAGS to the individual object files.
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
include $$(wildcard $$(_d)/*.dep)
- libs_list += $$(_lib)
+ libs_list += $$($(1)_PATH)
clean_list += $$(_d)/*.a $$(_d)/*.so $$(_d)/*.o $$(_d)/*.dep
dist_files += $$(_srcs)
endef
@@ -120,7 +120,7 @@ define PROGRAMS_template =
_d := $$($(1)_DIR)
_srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src))
$(1)_OBJS := $$(addsuffix .o, $$(basename $$(_srcs)))
- _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_NAME))
+ _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
$(1)_PATH := $$(_d)/$(1)
$$($(1)_PATH): $$($(1)_OBJS) $$(_libs)