From: Kali Developers <devel@kali.org>
Date: Wed, 17 Mar 2021 09:19:00 +0100
Subject: edit-makefile

Created a Makefile in the main source directory
to make things play nicer on build and install.
---
 Makefile | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3a501de
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+# This will point to the root of the FERRET project
+SRCDIR = src
+DSTDIR = bin
+TMPDIR = tmp
+
+LIBS = -ldl -lpthread
+INCLUDES = -I. -I$(SRCDIR) -I$(SRCDIR)/include
+
+CC = gcc
+CFLAGS += -g $(INCLUDES) -Wall
+
+.SUFFIXES: .c .cpp
+
+
+$(TMPDIR)/%.o: $(SRCDIR)/%.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@
+
+$(TMPDIR)/%.o: $(SRCDIR)/%.cpp
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@
+
+
+c_sources := $(wildcard $(SRCDIR)/*.c)
+cpp_sources := $(wildcard $(SRCDIR)/*.cpp)
+
+SRC = $(c_sources) $(cpp_sources)
+
+OBJ = $(addprefix $(TMPDIR)/, $(notdir $(addsuffix .o, $(basename $(SRC)))))
+
+$(DSTDIR)/hamster: $(OBJ)
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJ) -lm $(LIBS) -lstdc++
+
+depend:
+	makedepend $(CFLAGS) -Y $(SRC)
+
+clean:
+	rm -f $(OBJ)
