# Makefile for Irrlicht Examples # It's usually sufficient to change just the target name and source file list # and be sure that CXX is set to a valid compiler # Name of the executable created (.exe will be added automatically if necessary) Target := example # List of source files, separated by spaces Sources := main.cpp CGridSceneNode.cpp gravSphere.cpp # Path to Irrlicht directory, should contain include/ and lib/ IrrlichtHome := /home/akeen/public/irrlicht # general compiler settings (might need to be set when compiling the lib, too) # preprocessor flags, e.g. defines and include paths USERCPPFLAGS = # compiler flags such as optimization flags USERCXXFLAGS = -O3 -ffast-math #USERCXXFLAGS = -g -Wall # linker flags such as additional libraries and link paths USERLDFLAGS = -L/usr/lib/nvidia CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) CXXFLAGS = $(USERCXXFLAGS) LDFLAGS = $(USERLDFLAGS) #default target is Linux all: all_linux # target specific settings all_linux: LDFLAGS += -L$(IrrlichtHome)/lib -lIrrlicht all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 all_linux: $(warning Building...) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(Target) $(LDFLAGS) clean: clean_linux $(warning Cleaning...) clean_linux: @$(RM) $(Target) .PHONY: all clean clean_linux #multilib handling ifeq ($(HOSTTYPE), x86_64) LIBSELECT=64 endif #solaris real-time features ifeq ($(HOSTTYPE), sun4) LDFLAGS += -lrt endif