diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2025-05-04 18:58:30 -0700 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2025-05-04 18:58:30 -0700 |
commit | cd4afbb8595770d6058f0bcc7b5953946d5e87c4 (patch) | |
tree | b5b942153fd1ee6f1027acba3ff3fdaab23d1411 | |
parent | a879c97a5dbb9f29f7637509d4a02397478c8160 (diff) |
Maybe more correct
On raspberry pi debian 12, when trying to build
https://codeberg.org/flyxyz123/remote_plot, I got make error "ld:
undefined reference to ..." if use `cc -Wall $$(pkg-config --cflags
--libs libssh plplot gtk4) -lm -o $@ $^`. No error if move $^ to the
beginning. Not sure why, maybe becuase pi has an old version of gcc?
This repo does not have this issue if put `$^` at the end. But I think
put `$^` at the beginning maybe is a more correct way.
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ mycan.o: mycan.c mycan: all_SRE_edited.o mycan.o # $^ expand to all, $< expand to first # see `info make` section "10.5.3 Automatic Variables" - cc -Wall -o $@ $^ + cc $^ -Wall -o $@ clean: rm -f mycan all_SRE_edited.o mycan.o |