]> git.cworth.org Git - acre/blob - Makefile
Remove code duplication for X and Y ticks
[acre] / Makefile
1 bin_PROGRAMS = acre-test
2
3 acre_test_SOURCES = \
4         acre-test.c \
5         acre.c \
6         acre.h \
7         xmalloc.c \
8         xmalloc.h
9
10 acre_test_LDFLAGS=$$(pkg-config --libs pangocairo)
11
12 acre_test_CFLAGS=$$(pkg-config --cflags pangocairo) \
13         -Wall -Wextra -Wpointer-arith -Wstrict-prototypes \
14         -Wmissing-prototypes -Wmissing-declarations \
15         -Wnested-externs -Wno-unused-parameter
16
17 all: $(bin_PROGRAMS)
18
19 acre-test: acre-test.o acre.o xmalloc.o
20         $(CC) $(LDFLAGS) $(acre_test_LDFLAGS) $(acre_test_CFLAGS) $(CFLAGS) -o $@ $^
21
22 %.o: %.c
23         $(CC) $(LDFLAGS) $(acre_test_LDFLAGS) $(acre_test_CFLAGS) $(CFLAGS) -c -o $@ $<
24
25 Makefile.dep: *.c
26         $(CC) -M $(CPPFLAGS) $(acre_test_CFLAGS) $^ > $@
27 -include Makefile.dep
28
29 .PHONY: clean
30 clean:
31         rm -f $(bin_PROGRAMS) *.o Makefile.dep