1 # Irrlicht Engine Regression Tests Makefile
\r
3 Sources = $(wildcard *.cpp)
\r
5 CPPFLAGS = -I../include -I/usr/X11R6/include -pipe
\r
6 CXXFLAGS += -Wall -ansi -pedantic -fno-exceptions
\r
8 CXXFLAGS += -O0 -g -D_DEBUG
\r
10 CXXFLAGS += -fexpensive-optimizations -O3
\r
13 ifeq ($(HOSTTYPE), x86_64)
\r
19 # target specific settings
\r
20 all_linux: SYSTEM=Linux
\r
21 all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
\r
23 all_win32 clean_win32: SYSTEM=Win32-gcc
\r
24 all_win32: LDFLAGS = -L../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
\r
26 all_win32 clean_win32: SUF=.exe
\r
27 # name of the binary - only valid for targets which set SYSTEM
\r
28 DESTPATH = ../bin/$(SYSTEM)/$(Target)$(SUF)
\r
30 OBJ = $(Sources:.cpp=.o)
\r
32 all_linux all_win32: $(OBJ)
\r
33 $(warning Building...)
\r
34 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS)
\r
35 @$(RM) tests # otherwise it's easy to forget to copy it and run the old binary
\r
37 clean: clean_linux clean_win32
\r
38 $(warning Cleaning...)
\r
41 clean_linux clean_win32:
\r
44 .PHONY: all all_win32 clean clean_linux clean_win32
\r
46 # Create dependency files for automatic recompilation
\r
48 $(CXX) $(CPPFLAGS) -MM -MF $@ $<
\r
50 ifneq ($(MAKECMDGOALS),clean)
\r
51 -include $(OBJ:.o=.d)
\r