X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=makefile;h=810a1a4dc2bef181d21585860e596f58bfb3b016;hb=3b924bd8e3f3698fec5c31a20475597f0d749870;hp=eaa0b02e1f6e2166e08fd76312132b3b786019e0;hpb=7cd288f609ab7d99e5fb5b8da07d2c1b6f32907d;p=taskasaur.git diff --git a/makefile b/makefile index eaa0b02..810a1a4 100644 --- a/makefile +++ b/makefile @@ -1,25 +1,17 @@ + CC=gcc +CFLAGS=-g -Wall -Wno-unused-variable -Wno-switch +LIBS=-lncursesw -lmd4c make: taskasaur all: taskasaur -parser.o: parser.c headers/parser.h - $(CC) -c parser.c - -render.o: render.c headers/render.h - $(CC) -c render.c - -menu.o: menu.c headers/menu.h - $(CC) -c menu.c - -utils.o: utils.c headers/utils.h - $(CC) -c utils.c - -# include config.h as depend +%.o: %.c headers/%.h config.h + $(CC) $(CFLAGS) -c $< $(LIBS) -taskasaur: taskasaur.c parser.o render.o menu.o utils.o - $(CC) -o $@ $^ -lncurses -lmd4c +taskasaur: taskasaur.c menu.o parser.o render.o utils.o + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) clean: rm taskasaur *.o