Browse code

makefile: doc update for Makefile.utils

Andrei Pelinescu-Onciul authored on 01/10/2009 14:05:02
Showing 1 changed files
... ...
@@ -8,6 +8,24 @@
8 8
 # --------
9 9
 #  2009-04-23  initial version derived from Makefile.modules (andrei)
10 10
 
11
+#
12
+# Variables that should be defined in the util Makefiles, prior to including
13
+# this makefile:
14
+#
15
+# NAME - util binary name, with no path (MUST).
16
+#
17
+# COREPATH - path to the main/core directory (OPTIONAL, default ../..)
18
+#
19
+# DEFS - local extra defines (OPTIONAL)
20
+#
21
+# LIBS - local extra libs (OPTIONAL)
22
+#
23
+# SER_LIBS - ser/sr libs that should be compiled, linked against and installed
24
+#           along the binary. The format is: <path>/<shortname>, e.g.
25
+#           SER_LIBS=../../lib/srdb2/srdb2 for libsrdb2 with the sources
26
+#            in ../../lib/srdb2. (OPTIONAL)
27
+#
28
+
11 29
 UTIL_NAME=$(NAME)
12 30
 
13 31
 # default path to the core makefiles
... ...
@@ -66,10 +84,16 @@ install: $(NAME) $(util_dst) install-libs
66 66
 	$(INSTALL_TOUCH) $(util_dst)/$(NAME)
67 67
 	$(INSTALL_BIN)  $(NAME)  $(util_dst)
68 68
 
69
+ifneq (,$(SER_LIBS))
69 70
 install-libs:
70 71
 	@for lib in $(dir $(SER_LIBS)); do \
71 72
 		$(call try_err, $(MAKE) -C "$${lib}" install-if-newer ) ;\
72
-	done
73
+	done; true
74
+
75
+else
76
+install-libs:
77
+
78
+endif # $(SER_LIBS)
73 79
 
74 80
 .PHONY: install-if-newer
75 81
 install-if-newer: $(util_dst)/$(NAME)