]> git.lizzy.rs Git - irrlicht.git/blob - examples/01.HelloWorld/Makefile
Merging r6173 through r6179 from trunk to ogl-es branch
[irrlicht.git] / examples / 01.HelloWorld / Makefile
1 # Makefile for Irrlicht Examples\r
2 # It's usually sufficient to change just the target name and source file list\r
3 # and be sure that CXX is set to a valid compiler\r
4 \r
5 # Name of the executable created (.exe will be added automatically if necessary)\r
6 Target := 01.HelloWorld\r
7 # List of source files, separated by spaces\r
8 Sources := main.cpp\r
9 # Path to Irrlicht directory, should contain include/ and lib/\r
10 IrrlichtHome := ../..\r
11 # Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems\r
12 BinPath = ../../bin/$(SYSTEM)\r
13 \r
14 # general compiler settings (might need to be set when compiling the lib, too)\r
15 CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include\r
16 ifndef NDEBUG\r
17 CXXFLAGS += -g -Wall\r
18 else\r
19 CXXFLAGS += -O3\r
20 endif\r
21 \r
22 #default target is Linux\r
23 all: all_linux\r
24 \r
25 # target specific settings\r
26 all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht\r
27 all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -lXxf86vm -lXext -lX11 -lXcursor\r
28 all_linux clean_linux: SYSTEM=Linux\r
29 all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc\r
30 all_win32 clean_win32 static_win32: SUF=.exe\r
31 static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_\r
32 all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm\r
33 static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2\r
34 # name of the binary - only valid for targets which set SYSTEM\r
35 DESTPATH = $(BinPath)/$(Target)$(SUF)\r
36 \r
37 all_linux all_win32 static_win32:\r
38         $(warning Building...)\r
39         $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)\r
40 \r
41 clean: clean_linux clean_win32\r
42         $(warning Cleaning...)\r
43 \r
44 clean_linux clean_win32:\r
45         @$(RM) $(DESTPATH)\r
46 \r
47 .PHONY: all all_win32 static_win32 clean clean_linux clean_win32\r
48 \r
49 #multilib handling\r
50 ifeq ($(HOSTTYPE), x86_64)\r
51 LIBSELECT=64\r
52 endif\r
53 #solaris real-time features\r
54 ifeq ($(HOSTTYPE), sun4)\r
55 LDFLAGS += -lrt\r
56 endif\r