blob: 3105ef0f9d8330096b76d914ae739bf82b3c5716 [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
Christopher Fauletf95b1112016-12-21 08:58:16 +01009LDFLAGS = -lpthread -levent -levent_pthreads
Christopher Faulet1f40b912017-02-17 09:32:19 +010010INCS += -I../../include -I../../ebtree
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 $@ $<