summaryrefslogtreecommitdiff
blob: 86da956eb5f45d5b18e5e199005694ee25833a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- zlib-1.2.3/Makefile.in
+++ zlib-1.2.3/Makefile.in
@@ -24,7 +24,7 @@
 #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
 #           -Wstrict-prototypes -Wmissing-prototypes
 
-LDFLAGS=libz.a
+TEST_LDFLAGS=libz.a
 LDSHARED=$(CC)
 CPP=$(CC) -E
 
@@ -83,16 +83,16 @@
 	$(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@
 
 $(SHAREDLIBV): $(PIC_OBJS)
-	$(LDSHARED) -o $@ $(PIC_OBJS) -lc
+	$(LDSHARED) -o $@ $(PIC_OBJS) -lc $(LDFLAGS)
 	rm -f $(SHAREDLIB) $(SHAREDLIBM)
 	ln -s $@ $(SHAREDLIB)
 	ln -s $@ $(SHAREDLIBM)
 
 example$(EXE): example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
+	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) $(TEST_LDFLAGS)
 
 minigzip$(EXE): minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
+	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) $(TEST_LDFLAGS)
 
 install-libs: $(LIBS)
 	-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi