Source

vcprompt-mq / make-ldflags.diff

# HG changeset patch
# Parent 9cbf272265e8a569c8158869246ddf8fefd03e77

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,12 @@ sources = $(wildcard src/*.c)
 objects = $(subst .c,.o,$(sources))
 
 vcprompt: $(objects)
-	$(CC) -o $@ $(objects)
+	$(CC) $(LDFLAGS) -o $@ $(objects)
 
 # build a standalone version of capture_child() library for testing
 src/capture: src/capture.c src/capture.h src/common.c src/common.h
-	$(CC) -DTEST_CAPTURE $(CFLAGS) -o $@ src/capture.c src/common.c
+	$(CC) $(LDFLAGS) -DTEST_CAPTURE $(CFLAGS) -o $@ \
+		src/capture.c src/common.c
 
 # Maximally pessimistic view of header dependencies.
 $(objects): $(headers)