]> Pileus Git - lackey/blob - src/makefile
Add basic screen layout stuff
[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         @urxvt -e ./$<
19         @cat acal.log
20
21 clean:
22         rm -f *.o view/*.o $(PROG)
23
24 # Rules
25 $(PROG): $(SOURCES:%=%.o) $(VIEWS:%=view/%.o)
26         $(CC) $(CLFAGS) -o $@ $+ $(LDFLAGS)
27
28 %.o: %.c $(SOURCES:%=%.h) makefile
29         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<