Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 1 | DESTDIR = |
2 | PREFIX = /usr/local | ||||
3 | BINDIR = $(PREFIX)/bin | ||||
4 | |||||
5 | CC = gcc | ||||
6 | LD = $(CC) | ||||
7 | |||||
8 | CFLAGS = -g -O2 -Wall -Werror -pthread | ||||
9 | LDFLAGS = -lpthread | ||||
10 | |||||
11 | OBJS = spoa.o | ||||
12 | |||||
13 | |||||
14 | spoa: $(OBJS) | ||||
15 | $(LD) $(LDFLAGS) -o $@ $^ | ||||
16 | |||||
17 | install: spoa | ||||
18 | install spoa $(DESTDIR)$(BINDIR) | ||||
19 | |||||
20 | clean: | ||||
21 | rm -f spoa $(OBJS) | ||||
22 | |||||
23 | %.o: %.c | ||||
24 | $(CC) $(CFLAGS) -c -o $@ $< |