summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-16 00:51:35 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-16 00:51:35 +0000
commit33edda54ee9c8bac5d5f505f4d87352303fbcc15 (patch)
tree76f32c7254722c7863969fa910e2e4bc6bd44638
parent8c5329e8282900e6ad0fca3f60ba15ef15fe3d47 (diff)
downloads6-portable-utils-33edda54ee9c8bac5d5f505f4d87352303fbcc15.tar.xz
Test new make feature
-rw-r--r--Makefile2
-rwxr-xr-xtools/gen-deps.sh8
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 73d9cbb..46f8376 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@ $(DESTDIR)$(includedir)/$(package)/%.h: src/include/$(package)/%.h
exec $(REALCC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) $(CFLAGS_SHARED) -c -o $@ $<
$(ALL_BINS):
- exec $(REALCC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(LDLIBS_ALL)
+ exec $(REALCC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(EXTRA_LIBS) $(LDLIBS_ALL)
lib%.a:
exec $(AR) rc $@ $^
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh
index af31259..66f6d3e 100755
--- a/tools/gen-deps.sh
+++ b/tools/gen-deps.sh
@@ -68,12 +68,18 @@ for dir in $(ls -1 src | grep -v ^include) ; do
for file in $(ls -1 src/$dir/deps-exe) ; do
deps=
+ libs=
while read dep ; do
if echo $dep | grep -q -- \\.o$ ; then
dep="src/$dir/$dep"
fi
- deps="$deps $dep"
+ if echo $dep | grep -q ^\\\$ ; then
+ libs="$libs $dep"
+ else
+ deps="$deps $dep"
+ fi
done < src/$dir/deps-exe/$file
+ echo "$file: private EXTRA_LIBS :=$libs"
echo "$file: src/$dir/$file.o$deps"
done
done