aboutsummaryrefslogtreecommitdiffstats
path: root/testing/clapf/ldflags.patch
blob: 0dfd02de6a8d593f41e4cea485b28fe700f986bc (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
32
33
34
35
36
37
38
diff --git a/src/Makefile.in b/src/Makefile.in
index 9512aca..6b4388e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -17,7 +17,7 @@
 CFLAGS = @CFLAGS@ @CPPFLAGS@
 DEFS = @defs@
 INCDIR = -I. -I.. @INCDIR@ @sql_includes@
-LIBDIR = -L. -L../contrib/spamsum @LIBDIR@ @LDFLAGS@
+LIBDIR = -L. -L../contrib/spamsum @LIBDIR@
 LIBS = @LIBS@ @sql_libs@
 ##CLAMAV_EXTRA_LIBS = -lclamunrar_iface -lclamunrar
 OBJS = @OBJS@
@@ -40,13 +40,12 @@ install: install-clapf install-includes install-splitmbox @parsembox_install@ @s
 
 
 clapf: clapf.c libclapf.a
-	$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
+	$(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @libclamav_extra_libs@
 
 libclapf.a: $(OBJS) $(SQL_OBJS)
 	ar cr libclapf.a $(OBJS) $(SQL_OBJS)
 	ranlib libclapf.a
-	#$(CC) -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@
-	$(CC) -shared -Wl -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@
+	$(CC) @LDFLAGS@ -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS)
 	ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so
 	ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so.$(CLAPF_VERSION)
 
@@ -75,7 +75,7 @@
 	$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ $(LIBS) $(LDAP_LIBS) $(LIBDIR) -ltre
 
 test:
-	$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR) @LDFLAGS@
+	$(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR)
 
 %.o: $(srcdir)/%.c
 	$(CC) $(CFLAGS) -fPIC $(INCDIR) $(DEFS) -c $< -o $@