summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-12-15 01:55:11 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-12-17 10:55:20 +0100
commit94237354ddbf2abc0f04e7f06ee3c1263dfc6b6e (patch)
tree4a8991e7e52deedde5c156c28dcd458b98c30aa6 /base
parent0dc7abe013729b3b3560b67fcc37f3cc619f323d (diff)
downloadlvm2-94237354ddbf2abc0f04e7f06ee3c1263dfc6b6e.tar.gz
makefiles: correcting login of makefile
Fixing some ordering issue with inclusion of common make.tmpl. Correcting dependency calculation Simplifying inclusive makefile
Diffstat (limited to 'base')
-rw-r--r--base/Makefile21
1 files changed, 8 insertions, 13 deletions
diff --git a/base/Makefile b/base/Makefile
index 6050c3a2a..9f8bccca6 100644
--- a/base/Makefile
+++ b/base/Makefile
@@ -14,7 +14,7 @@
# Comment to build the advanced radix tree.
#base/data-struct/radix-tree.o: CFLAGS += -DSIMPLE_RADIX_TREE
-# NOTE: this include only works as 'include' for toplevel Makefile
+# NOTE: this Makefile only works as 'include' for toplevel Makefile
# which defined all top_* variables
BASE_SOURCE=\
@@ -22,24 +22,19 @@ BASE_SOURCE=\
base/data-struct/list.c \
base/data-struct/radix-tree.c
+BASE_TARGET = base/libbase.a
BASE_DEPENDS = $(BASE_SOURCE:%.c=%.d)
BASE_OBJECTS = $(BASE_SOURCE:%.c=%.o)
CLEAN_TARGETS += $(BASE_DEPENDS) $(BASE_OBJECTS) \
$(BASE_SOURCE:%.c=%.gcda) \
- $(BASE_SOURCE:%.c=%.gcno)
+ $(BASE_SOURCE:%.c=%.gcno) \
+ $(BASE_TARGET)
-ifeq ("$(USE_TRACKING)","yes")
-ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov lcov-reset \
- help check check_local check_cluster check_lvmetad check_lvmpolld))
- -include $(BASE_DEPENDS)
-endif
-endif
-
-$(BASE_OBJECTS): INCLUDES+=-I$(top_srcdir)/base/
-
-base/libbase.a: $(BASE_OBJECTS)
+$(BASE_TARGET): $(BASE_OBJECTS)
@echo " [AR] $@"
$(Q) $(RM) $@
$(Q) $(AR) rsv $@ $(BASE_OBJECTS) > /dev/null
-CLEAN_TARGETS += base/libbase.a
+ifeq ("$(DEPENDS)","yes")
+-include $(BASE_DEPENDS)
+endif