summaryrefslogtreecommitdiff
path: root/source/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'source/Makefile')
-rw-r--r--source/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/Makefile b/source/Makefile
new file mode 100644
index 0000000..2cd8f59
--- /dev/null
+++ b/source/Makefile
@@ -0,0 +1,26 @@
+TARGET = flood
+
+INSTALL_DIR = /usr/bin
+
+SRCS = $(wildcard *.c)
+
+CFLAGS = -pthread
+CC = gcc $(CFLAGS)
+
+all: build
+
+build: $(TARGET)
+
+$(TARGET): $(SRCS)
+ $(CC) -o $(TARGET) $(SRCS)
+
+clean:
+ rm -f $(TARGET)
+
+install: build
+ cp $(TARGET) $(INSTALL_DIR)
+ chown root:root $(INSTALL_DIR)/$(TARGET)
+ setcap cap_net_raw,cap_net_admin=eip $(INSTALL_DIR)/$(TARGET)
+
+uninstall:
+ rm -f $(INSTALL_DIR)/$(TARGET)