added missing bzr files
[winnie] / winnie / Makefile
1 src = $(wildcard src/*.cc) $(wildcard src/fbdev/*.cc) $(wildcard src/sdl/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = wserver
5
6 dbg = -g
7 opt = -O0
8 inc = -Isrc -I../libwinnie/src
9
10 backend = SDL
11
12 ifeq ($(backend), SDL)
13         def = -DWINNIE_SDL
14         libs = -lSDL
15 else
16         def = -DWINNIE_FBDEV
17 endif
18
19 CXX = g++
20 CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(inc) $(def) `freetype-config --cflags`
21 LDFLAGS = -L../libwinnie $(libs) `freetype-config --libs` -lrt -lwinnie
22
23 $(bin): $(obj) ../libwinnie/libwinnie.so
24         $(CXX) -o $@ $(obj) $(LDFLAGS) -Wl,-rpath=../libwinnie
25
26 -include $(dep)
27
28 %.d: %.cc
29         @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
30
31 .PHONY: clean
32 clean:
33         rm -f $(obj) $(bin) $(dep)
34