blob: baa334cc1792052d51f9922db91763f32d28bfab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
CC=gcc
GIT_VERSION := "$(shell git describe --abbrev=4 --dirty --always --tags || cat VERSION)"
BINARY=blabouncer
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
blabouncer: blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c config.h functions.h logging.h message.h replay.h sockets.h structures.h
$(CC) -D_DEFAULT_SOURCE -D_BSD_SOURCE -DVERSION=\"$(GIT_VERSION)\" -std=gnu99 -Wall -Wextra -lssl -lcrypto -o $(BINARY) blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c
.PHONY: clean
clean:
rm -f $(BINARY)
.PHONY: install
install: blabouncer
install -d $(DESTDIR)$(PREFIX)/bin/
install -m 755 blabouncer $(DESTDIR)$(PREFIX)/bin/
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/blabouncer
|