fixup for order-fussier linker
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 09:10:55 +0000 (20:10 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 09:10:55 +0000 (20:10 +1100)
Makefile

index c9df3bb0f33d5eccf721d35dc835b6e2552c8b10..7b12aef4a4e9111d5ef0cbba7c1feb7eee95d05d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,13 @@ BINS = fusefile
 default: $(BINS)
 
 fusefile: CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
-fusefile: LDFLAGS = -lfuse
-fusefile: fusefile.c
+fusefile: LDFLAGS = -lfuse -pthread
+
+.INTERMEDIATE: fusefile.o
+fusefile.o: fusefile.c
+
+fusefile: fusefile.o
+       $(CC) $(CFLAGS) $(CPPFLAGS) $? $(LDFLAGS) $(TARGET_ARCH) -o $@
 
 clean:
        rm -f $(BINS)