summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..2c13834
--- /dev/null
+++ b/makefile
@@ -0,0 +1,19 @@
+# Compiler
+CPP := c++
+CFLAGS := -Wall -pedantic -std=c++17 -fPIC -shared -I include -DDEBUG
+LFLAGS := -lSDL2
+
+SRCS := $(wildcard *.cpp)
+OBJS := $(patsubst %.cpp,build/%.o,$(SRCS))
+
+# Recipes
+all: build/libwrapsdl2.so
+
+build/libwrapsdl2.so: $(OBJS)
+ $(CPP) $(CFLAGS) -o $@ $(LFLAGS) $(OBJS)
+
+build/%.o: %.cpp build
+ $(CPP) $(CFLAGS) -o $@ -c $<
+
+build:
+ mkdir -p build