summaryrefslogtreecommitdiff
blob: 9a29a3fa59ebfd9ef94363c047976a90f0b689e7 (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
39
40
--- Makefile.in
+++ Makefile.in
@@ -34,13 +34,16 @@
 # build flags
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@ @DEFS@ -I.
-LDFLAGS = @LDFLAGS@ @LIBS@
+LDFLAGS = @LDFLAGS@ 
+LIBS = @LIBS@
 
 XML_CFLAGS = @XML_CFLAGS@
-XML_LDFLAGS = @XML_LDFLAGS@ @XML_LIBS@
+XML_LDFLAGS = @XML_LDFLAGS@ 
+LIBS += @XML_LIBS@
 
 PERL_CFLAGS = @PERL_CFLAGS@
-PERL_LDFLAGS = @PERL_LDFLAGS@ @PERL_LIBS@
+PERL_LDFLAGS = @PERL_LDFLAGS@ 
+LIBS += @PERL_LIBS@
 
 # build targets
 PLUGINS = @PLUGINS@
@@ -63,7 +66,7 @@
 # feedbackd-agent main program
 $(AGENT): src/feedbackd-agent
 
-src/feedbackd-agent: $(foreach f, $($(AGENT)_objs), src/$(f).o)
+src/feedbackd-agent: $(foreach f, $($(AGENT)_objs), src/$(f).o) $(LIBS)
 
 src/feedbackd-agent: CFLAGS  += $(XML_CFLAGS)
 src/feedbackd-agent: LDFLAGS += $(XML_LDFLAGS)
@@ -75,7 +78,7 @@
 $(PLUGINS) : % : src/plugins/%.so
 
 src/plugins/%.so: src/plugins/%.o
-	$(CC) -shared -nostartfiles $(LDFLAGS) -o $@ $^
+	$(CC) -shared -nostartfiles $(LDFLAGS) -o $@ $^ $(LIBS)
 
 src/plugins/%.so: CFLAGS+=-fPIC $(XML_CFLAGS)
 src/plugins/%.so: LDFLAGS+=$(XML_LDFLAGS)