X-Git-Url: http://git.mutantstargoat.com?p=winnie;a=blobdiff_plain;f=Makefile;h=ad3fd6c480e5226ef1931d1950e0c52b08026887;hp=3ced08b2da3a056ba14953b90ad0ca87961dc926;hb=29a5d0c43628aac78adba856e96b8a38b95ad59d;hpb=0860ce537422597075fbc63ddcc9a73303362a93 diff --git a/Makefile b/Makefile index 3ced08b..ad3fd6c 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) +LDFLAGS = $(libs) $(bin): $(obj) $(CXX) -o $@ $(obj) $(LDFLAGS)