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 |
Christopher Faulet | f95b111 | 2016-12-21 08:58:16 +0100 | [diff] [blame] | 9 | LDFLAGS = -lpthread -levent -levent_pthreads |
Christopher Faulet | 1f40b91 | 2017-02-17 09:32:19 +0100 | [diff] [blame] | 10 | INCS += -I../../include -I../../ebtree |
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 $@ $< |