Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 = MeshConverter
  5. Sources = main.cpp
  6. # general compiler settings
  7. CPPFLAGS = -I../../include -I/usr/X11R6/include
  8. CXXFLAGS = -O3 -ffast-math -Wall
  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
  17. all_linux clean_linux: SYSTEM=Linux
  18. all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lglu32 -lm
  19. all_win32 clean_win32: SYSTEM=Win32-gcc
  20. all_win32 clean_win32: SUF=.exe
  21. # name of the binary - only valid for targets which set SYSTEM
  22. DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
  23. all_linux all_win32:
  24. $(warning Building...)
  25. $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
  26. clean: clean_linux clean_win32
  27. $(warning Cleaning...)
  28. clean_linux clean_win32:
  29. @$(RM) $(DESTPATH)
  30. .PHONY: all all_win32 clean clean_linux clean_win32