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 |
Willy Tarreau | fc80e30 | 2020-05-27 11:05:33 +0200 | [diff] [blame^] | 9 | INCS += -I./include |
Christian Ruppert | 57dc283 | 2017-11-30 10:11:36 +0100 | [diff] [blame] | 10 | LIBS = -lpthread -levent -levent_pthreads |
Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 11 | |
| 12 | OBJS = spoa.o |
| 13 | |
| 14 | |
| 15 | spoa: $(OBJS) |
Christian Ruppert | 57dc283 | 2017-11-30 10:11:36 +0100 | [diff] [blame] | 16 | $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) |
Christopher Faulet | 010fded | 2016-11-03 22:49:37 +0100 | [diff] [blame] | 17 | |
| 18 | install: spoa |
| 19 | install spoa $(DESTDIR)$(BINDIR) |
| 20 | |
| 21 | clean: |
| 22 | rm -f spoa $(OBJS) |
| 23 | |
| 24 | %.o: %.c |
Christopher Faulet | f95b111 | 2016-12-21 08:58:16 +0100 | [diff] [blame] | 25 | $(CC) $(CFLAGS) $(INCS) -c -o $@ $< |