]> git.cworth.org Git - dvonn/commitdiff
Fix compilation by putting libraries late on the command line
authorCarl Worth <cworth@cworth.org>
Fri, 24 Apr 2020 19:08:18 +0000 (12:08 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 24 Apr 2020 19:12:31 +0000 (12:12 -0700)
Again, I don't know what changed in the compilation toolchain, but
apparently to get compilation to work now, we need to put libraries we
depend on after the object files that depend on them.

Makefile

index ab8e9a0a9ab70004e381ca733fc794e2407f6151..baa960bc8bb86211f90125e6ba0396c4ef88e62f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ all: $(ALL)
        $(CC) $(CFLAGS) $(MYCFLAGS) -c -o $@ -c $<
 
 dvonn: dvonn.o dvonn-board.o
-       $(CC) $(LDLAGS) $(MYLDFLAGS) -o $@ $^ -lm
+       $(CC) -o $@ $^ $(LDFLAGS) $(MYLDFLAGS) -lm
 
 Makefile.dep: *.c
        $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@