LIBS go after objects to allow linking with ld --as-needed
authorAndreas Moog <amoog@ubuntu.com>
Sun, 19 Jun 2011 20:03:10 +0000 (22:03 +0200)
committerGuus Sliepen <guus@debian.org>
Fri, 24 Jun 2011 10:00:57 +0000 (12:00 +0200)
makefile

index 0a9cc9460f6072c5f61b79ea987e407d1ee27a1b..509c2ff862740f21acbab3274a2084beeee0c017 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -82,16 +82,16 @@ all: $(ALL)
 
 # linking the program.
 $(PROG): $(GAMEOBJS)
-       $(CXX) $(LIBS) $(GAMEOBJS) -o $(PROG)
+       $(CXX) $(GAMEOBJS) -o $(PROG) $(LIBS)
        
 pak: $(PAKOBJS)
-       $(CXX) $(LIBS) $(PAKOBJS) -o pak
+       $(CXX) $(PAKOBJS) -o pak $(LIBS)
 
 %.mo: %.po
        msgfmt -c -o $@ $<
 
 mapeditor: $(MAPOBJS)
-       $(CXX) $(LIBS) $(MAPOBJS) -o mapeditor
+       $(CXX) $(MAPOBJS) -o mapeditor $(LIBS)
 
 # cleaning everything that can be automatically recreated with "make".
 clean: