commit 80aabad7cb520fd890dfb82d35da30a9300ee439
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Sun Apr 16 23:22:25 2017 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Sun Apr 16 23:24:43 2017 +0200

    Bring cc-command-line in order
    
    Of course, you want the libraries to come last in order of execution.
    Additionally, in case the libraries provided with $($*-LDFLAGS) contain
    unresolved symbols, we want to give the opportunity for the user to
    provide the necessary general symbols, whatever they may be, last.
    
    Thanks Duncaen for reporting this!

diff --git a/Makefile b/Makefile
index ca1949b..baf2d41 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ $(BIN): $(REQ:=.o)
 $(BIN:=.o): config.mk $(HDR) $(REQ:=.h)
 
 .o:
-       $(CC) $(LDFLAGS) $($*-LDFLAGS) -o $@ $< $(REQ:=.o)
+       $(CC) -o $@ $< $(REQ:=.o) $($*-LDFLAGS) $(LDFLAGS)
 
 clean:
        rm -f $(BIN) $(BIN:=.o) $(REQ:=.o)

Reply via email to