]> Pileus Git - lackey/blob - src/makefile
Add template files
[lackey] / src / makefile
1 # Settings
2 CC       = gcc
3 CFLAGS   = -Wall --std=c99
4 CPPFLAGS =
5 LDFLAGS  = -lncursesw
6 PROG     = acal
7
8 # Views
9 SOURCES  = main screen
10 VIEWS    = day week month year todo notes settings help
11
12 default: test
13
14 # Targets
15 all: $(PROG)
16
17 test: $(PROG)
18         ./$<
19
20 clean:
21         rm -f *.o view/*.o $(PROG)
22
23 # Rules
24 $(PROG): $(SOURCES:%=%.o) $(VIEWS:%=view/%.o)
25         $(CC) $(CLFAGS) -o $@ $+ $(LDFLAGS)
26
27 %.o: %.c $(SOURCES:%=%.h) makefile
28         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<