ccdemos/Makefile
author Radek Brich <radek.brich@devl.cz>
Mon, 17 Dec 2007 22:03:50 +0100
branchpyrit
changeset 40 929aad02c5f2
parent 39 7079dcc3bd74
child 41 c1080cb5bd6d
permissions -rw-r--r--
Makefile: added help and distclean target, plus small fixes ccdemos/common_sdl.h: print fps to window caption instead of console update and key callbacks fixed segfault when resizing window pressing c now causes print out of camera coordinates ccdemos/spheres_shadow.cc: controlling position of a light and focal length of camera

ifndef $(ROOT)
	ROOT=$(shell pwd)/..
endif

include $(ROOT)/config.mk

RTLIBS=libs-double
DEFS+=-DPYRIT_DOUBLE


### Rules ###
%.o: %.cc
	$(CXX) -c -o $@ $(CCFLAGS) $(SDL_CCFLAGS) $< $(DEFS)

%: %.o
	$(CXX) -o $@ $(ROOT)/bin/$(RTLIBS)/*.o $< image.o $(LDFLAGS) $(SDL_LDFLAGS) -lpng

### Targets ###
all: realtime realtime_dragon realtime_bunny spheres_shadow

realtime: realtime.o $(RTLIBS) image.o
realtime_dragon: realtime_dragon.o $(RTLIBS) image.o
realtime_bunny: realtime_bunny.o $(RTLIBS) image.o
spheres_shadow: spheres_shadow.o $(RTLIBS) image.o

realtime.o: realtime.cc common_sdl.h
realtime_dragon.o: realtime_dragon.cc common_sdl.h common_ply.h
realtime_bunny.o: realtime_bunny.cc common_sdl.h common_ply.h
spheres_shadow.o: spheres_shadow.cc common_sdl.h

libs-float:
	$(MAKE) -C ../src libs-float

libs-double:
	$(MAKE) -C ../src libs-double

image.o: image.c
	$(CXX) -c -o $@ $*.c

clean:
	rm -f spheres_shadow realtime realtime_dragon realtime_bunny *.o

distclean: clean
	rm -rf *.png