1
# Makefile for Irrlicht Examples
2
# It's usually sufficient to change just the target name and source file list
3
# and be sure that CXX is set to a valid compiler
7
# general compiler settings
8
CPPFLAGS = -I../../include -I/usr/X11R6/include
9
CXXFLAGS = -O3 -ffast-math
12
#default target is Linux
15
ifeq ($(HOSTTYPE), x86_64)
19
# target specific settings
20
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
21
all_linux clean_linux: SYSTEM=Linux
22
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
23
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
24
all_win32 clean_win32: SYSTEM=Win32-gcc
25
all_win32 clean_win32: SUF=.exe
26
# name of the binary - only valid for targets which set SYSTEM
27
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
30
$(warning Building...)
31
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
33
clean: clean_linux clean_win32
34
$(warning Cleaning...)
36
clean_linux clean_win32:
39
.PHONY: all all_win32 clean clean_linux clean_win32