X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=Makefile;h=651c1efa94d4f4f8a440eb645b153d8e5bf5c564;hb=2eb18813b84ae8ad4faeb92b1d8570599135d537;hp=5d15674af8ce31a10e77bde144bfcd93e1a41cac;hpb=fa25398cc50777016fde97191e1bee1c0ab7d1f1;p=wordgame diff --git a/Makefile b/Makefile index 5d15674..651c1ef 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,18 @@ -wordgame: wordgame.o - $(CC) $(CFLAGS) $(LDFLAGS) -lreadline -lm -o $@ $^ +WGCFLAGS=-Wall -Wextra -Wno-unused-parameter + +PROGRAMS=grid + +LIBRARY=dict.o + +all: $(PROGRAMS) + +%.o: %.c + $(CC) $(CFLAGS) $(WGCFLAGS) -c -o $@ $^ + +%.c: dict.h + +grid: grid.o $(LIBRARY) + $(CC) $(CFLAGS) $(WGCFLAGS) $(LDFLAGS) -lreadline -lm -o $@ $^ + +clean: + rm -f $(PROGRAMS) *.o