summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8176c1f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+PWD := $(shell pwd)
+
+SDIR := $(PWD)/src
+IDIR := $(PWD)/include
+ODIR := $(PWD)/bin
+
+SFILES := $(wildcard $(SDIR)/*.cpp)
+OFILES := $(patsubst $(SDIR)/%.cpp,$(ODIR)/%.o,$(SFILES))
+
+OUT := spacelike
+
+CC := g++
+CFLAGS := -std=c++20 -Wall -Wextra -MP -MD -I$(IDIR) -g -Wno-unused
+
+-include $(SDIR/:.cpp=.d)
+
+all: ${OFILES}
+ $(CC) $(CFLAGS) ${OFILES} -o $(OUT)
+
+clean:
+ rm ${OFILES}
+
+$(ODIR)/%.o : $(SDIR)/%.cpp
+ $(CC) $(CFLAGS) -c $< -o $@
+