summaryrefslogtreecommitdiffstats
path: root/test/makefile
blob: a2d6800a44b37cfa5a1af7b63f6d24a975eefbea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Compiler
CPP    := c++
CFLAGS := -Wall -pedantic -std=c++17 -fPIC -I ../include -DDEBUG
LFLAGS := ../build/libwrapsdl2.so -lSDL2 -lpthread

SRCS := $(wildcard *.cpp)
OBJS := $(patsubst %.cpp,build/%.o,$(SRCS))

# Recipes
all: build/window_test

.PHONY: run
run: build/window_test
	./build/window_test

build/window_test: build/window_test.o
	$(CPP) $(CFLAGS) -o $@ $< $(LFLAGS)

build/%.o: %.cpp build
	$(CPP) $(CFLAGS) -o $@ -c $<

build:
	mkdir -p build