]> git.cworth.org Git - wordgame/blobdiff - Makefile
Eliminate useless layer of dict wrapping trie.
[wordgame] / Makefile
index fc58ee8724b56e7c71bf4e421286c5fc850970a5..8d8e5a5e36dace4e4d7b619037d430184409adff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1 +1,20 @@
-wordgame: wordgame.c
+WGCFLAGS=-Wall -Wextra -Wno-unused-parameter
+
+PROGRAMS=grid
+all: $(PROGRAMS)
+
+LIBRARY=dict.o
+
+grid: grid.o $(LIBRARY)
+       $(CC) $(CFLAGS) $(WGCFLAGS) $(LDFLAGS) -lreadline -lm -o $@ $^
+
+%.o: %.c
+       $(CC) $(CFLAGS) $(WGCFLAGS) -c -o $@ $<
+
+Makefile.dep: *.c
+       $(CC) -M $(CPPFLAGS) $^ > $@
+-include Makefile.dep
+
+.PHONY: clean
+clean:
+       rm -f $(PROGRAMS) *.o Makefile.dep