blob: a1c1eb5336d000f2ca7cd5ac2454f53d5cff8c6e [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
Willy Tarreaufc80e302020-05-27 11:05:33 +02009INCS += -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 $@ $<