X-Git-Url: https://eleni.mutantstargoat.com/git/?p=winnie;a=blobdiff_plain;f=Makefile;h=424218728adff5a1cca9789e6340190ab83712ef;hp=3ced08b2da3a056ba14953b90ad0ca87961dc926;hb=52044efd7717f4b02bd463c9a26f83c9a41953ea;hpb=0860ce537422597075fbc63ddcc9a73303362a93 diff --git a/Makefile b/Makefile index 3ced08b..4242187 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,24 @@ -src = $(wildcard src/*.cc) +src = $(wildcard src/*.cc) $(wildcard src/fbdev/*.cc) $(wildcard src/sdl/*.cc) obj = $(src:.cc=.o) dep = $(obj:.o=.d) bin = winnie - dbg = -g opt = -O0 -inc = -Isrc -Isrc/shaders -Isrc/math +inc = -Isrc + +backend = SDL + +ifeq ($(backend), SDL) + def = -DWINNIE_SDL + libs = -lSDL +else + def = -DWINNIE_FBDEV +endif CXX = g++ -CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(inc) -#LDFLAGS = +CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(inc) $(def) `freetype-config --cflags` +LDFLAGS = $(libs) `freetype-config --libs` $(bin): $(obj) $(CXX) -o $@ $(obj) $(LDFLAGS)