From f40251efc21a4e2db446af73c810d1b063cf84fb Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 21 Jan 2019 04:00:58 +0100 Subject: Initial commit, add makefile, .gitignore and debug header --- makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 makefile (limited to 'makefile') 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 -- cgit v1.2.1