]> git.scottworley.com Git - tl-append/blobdiff - Makefile
Hold a lock while appending
[tl-append] / Makefile
index 8209ef88fd7ab6220b6b7182cd06bd3641a9456f..f4db060bfd077c526e0b0d9e3eb66086d6766a62 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,13 @@ prefix = /usr/local
 bindir = $(prefix)/bin
 INSTALL = install
 
-tl-append:
+tl-append: common.o
+tl-append-test: common.o
 
+%.o: %.c
+       $(CC) -Wall -Wextra -pedantic -std=c99 -o $@ -c $^
 %: %.c
-       $(CC) -Wall -Wextra -pedantic -o $@ $^
+       $(CC) -Wall -Wextra -pedantic -std=c99 -o $@ $^
 
 .PHONY: check
 check: tl-append tl-append-test
@@ -15,3 +18,10 @@ check: tl-append tl-append-test
 install: tl-append
        $(INSTALL) -d $(DESTDIR)$(bindir)
        $(INSTALL) -m 755 $^ $(DESTDIR)$(bindir)
+
+.PHONY: clean
+clean:
+       -rm tl-append tl-append-test tl.log *.o
+
+tl-append.o: common.h
+tl-append-test.o: common.h