]> xenbits.xensource.com Git - people/iwj/ring3-xl-test.git/commitdiff
Makefile: Order link line correctly
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 23 Jun 2015 17:40:36 +0000 (18:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 23 Jun 2015 17:40:36 +0000 (18:40 +0100)
Unix linkers are order-sensitive, particularly for static linking, and
libraries must come after the things that use them.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Makefile

index 62770b0f7a927f91975e7bcd79e52d49d3783994..2e79646266450715a96a7a79ab534ff4ffc900c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ ALL_SRCS = $(SRCS) $(TESTS)
 all: $(TESTS:.c=)
 
 test_%: $(SRCS:.c=.o) test_%.o
-       $(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
+       $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
 
 %.d: %.c
        $(CC) -M $< > $@