blob: aee6139c8a7c722001cd22ef29ad476be1f44ac8 [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
10INCS += -I../../include
11LIBS =
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 $@ $<