blob: c44c2b87937a6512bc4688737e23b8d02faa2d25 [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 +01009INCS += -I../../ebtree -I./include
Christian Ruppert57dc2832017-11-30 10:11:36 +010010LIBS = -lpthread -levent -levent_pthreads
Christopher Faulet010fded2016-11-03 22:49:37 +010011
12OBJS = spoa.o
13
14
15spoa: $(OBJS)
Christian Ruppert57dc2832017-11-30 10:11:36 +010016 $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
Christopher Faulet010fded2016-11-03 22:49:37 +010017
18install: spoa
19 install spoa $(DESTDIR)$(BINDIR)
20
21clean:
22 rm -f spoa $(OBJS)
23
24%.o: %.c
Christopher Fauletf95b1112016-12-21 08:58:16 +010025 $(CC) $(CFLAGS) $(INCS) -c -o $@ $<