blob: d04a01e11aad731ae0dfc18916cc86860bd0b690 [file] [log] [blame]
Christopher Faulet010fded2016-11-03 22:49:37 +01001DESTDIR =
2PREFIX = /usr/local
3BINDIR = $(PREFIX)/bin
4
5CC = gcc
6LD = $(CC)
7
8CFLAGS = -g -O2 -Wall -Werror -pthread
Eric Salama8a9c6c22017-11-10 11:02:23 +01009LDFLAGS = -lpthread -levent -levent_pthreads
10INCS += -I../../ebtree -I./include
Christopher Fauletf95b1112016-12-21 08:58:16 +010011LIBS =
Christopher Faulet010fded2016-11-03 22:49:37 +010012
13OBJS = spoa.o
14
15
16spoa: $(OBJS)
Christopher Fauletf95b1112016-12-21 08:58:16 +010017 $(LD) $(LDFLAGS) $(LIBS) -o $@ $^
Christopher Faulet010fded2016-11-03 22:49:37 +010018
19install: spoa
20 install spoa $(DESTDIR)$(BINDIR)
21
22clean:
23 rm -f spoa $(OBJS)
24
25%.o: %.c
Christopher Fauletf95b1112016-12-21 08:58:16 +010026 $(CC) $(CFLAGS) $(INCS) -c -o $@ $<