summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2024-03-30 13:27:28 +0000
committerLuke Bratch <luke@bratch.co.uk>2024-03-30 13:27:28 +0000
commit8450fa9418e3d0003a6990a5384437bde4ea76c0 (patch)
tree02f21cb1fb2042e02f241202abd238054637a6d8 /Makefile
parent19b38deee89aef4e5d6417d3b7d8e03b70a948ef (diff)
Make Makefile pay attention to header files, and add a make clean.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 391a278..c48a819 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,16 @@
CC=gcc
+BINARY=blabouncer
+
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
-blabouncer: blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c
- $(CC) -D_DEFAULT_SOURCE -D_BSD_SOURCE -std=gnu99 -Wall -Wextra -lssl -lcrypto -o blabouncer blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c
+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 -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