summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-21 04:00:58 +0100
committerNao Pross <naopross@thearcway.org>2019-01-21 04:02:18 +0100
commitf40251efc21a4e2db446af73c810d1b063cf84fb (patch)
treedce905174d6020d11e885a860b3dbce6c7899b6e /makefile
downloadlibwsdl2-f40251efc21a4e2db446af73c810d1b063cf84fb.tar.gz
libwsdl2-f40251efc21a4e2db446af73c810d1b063cf84fb.zip
Initial commit, add makefile, .gitignore and debug header
Diffstat (limited to 'makefile')
-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