Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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
  4. Target = 17.HelloWorld_Mobile
  5. Sources = main.cpp
  6. # general compiler settings
  7. CPPFLAGS = -I../../include
  8. CXXFLAGS = -O3 -ffast-math
  9. #CXXFLAGS = -g -Wall
  10. #default target is Linux
  11. all: all_linux
  12. ifeq ($(HOSTTYPE), x86_64)
  13. LIBSELECT=64
  14. endif
  15. # target specific settings
  16. all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
  17. all_linux clean_linux: SYSTEM=Linux
  18. all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
  19. all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
  20. all_win32 clean_win32: SYSTEM=Win32-gcc
  21. all_win32 clean_win32: SUF=.exe
  22. # name of the binary - only valid for targets which set SYSTEM
  23. DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
  24. all_linux all_win32:
  25. $(warning Building...)
  26. $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
  27. clean: clean_linux clean_win32
  28. $(warning Cleaning...)
  29. clean_linux clean_win32:
  30. @$(RM) $(DESTPATH)
  31. .PHONY: all all_win32 clean clean_linux clean_win32