Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 1 | DESTDIR = |
| 2 | PREFIX = /usr/local |
| 3 | BINDIR = $(PREFIX)/bin |
| 4 | |
| 5 | CC = gcc |
| 6 | LD = $(CC) |
| 7 | |
| 8 | CFLAGS = -g -O2 -Wall -Werror -pthread |
Eric Salama | 8a9c6c2 | 2017-11-10 11:02:23 +0100 | [diff] [blame^] | 9 | LDFLAGS = -lpthread -levent -levent_pthreads |
| 10 | INCS += -I../../ebtree -I./include |
Christopher Faulet | f95b111 | 2016-12-21 08:58:16 +0100 | [diff] [blame] | 11 | LIBS = |
Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 12 | |
| 13 | OBJS = spoa.o |
| 14 | |
| 15 | |
| 16 | spoa: $(OBJS) |
Christopher Faulet | f95b111 | 2016-12-21 08:58:16 +0100 | [diff] [blame] | 17 | $(LD) $(LDFLAGS) $(LIBS) -o $@ $^ |
Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 18 | |
| 19 | install: spoa |
| 20 | install spoa $(DESTDIR)$(BINDIR) |
| 21 | |
| 22 | clean: |
| 23 | rm -f spoa $(OBJS) |
| 24 | |
| 25 | %.o: %.c |
Christopher Faulet | f95b111 | 2016-12-21 08:58:16 +0100 | [diff] [blame] | 26 | $(CC) $(CFLAGS) $(INCS) -c -o $@ $< |