summaryrefslogtreecommitdiffstats
path: root/makefile
blob: 2c13834f1d1a5e2d6d64b5d0b0d0c139c0e920c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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