Advertisement
Guest User

Untitled

a guest
Sep 5th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  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 = test
  5. Sources = src/main.cpp src/map.cpp src/player.cpp
  6.  
  7. IRRLICHTPATH = /home/chris/Desktop/minetestold/irrlicht/
  8. JTHREADPATH = /home/chris/Desktop/minetestold/jthread/
  9.  
  10. # general compiler settings
  11. CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src
  12. #CXXFLAGS = -O3 -ffast-math -Wall
  13. #CXXFLAGS = -O3 --fast-math -Wall -g
  14. #CXXFLAGS = -Wall -g
  15. CXXFLAGS = -O2 --fast-math -Wall -g
  16.  
  17. #default target is Linux
  18. all: all_linux
  19.  
  20. ifeq ($(HOSTTYPE), x86_64)
  21. LIBSELECT=64
  22. endif
  23.  
  24. # target specific settings
  25. all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L$(IRRLICHTPATH)/lib/Linux -L$(JTHREADPATH)/src/.libs -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -ljthread
  26. all_linux clean_linux: SYSTEM=Linux
  27. all_win32: LDFLAGS = -L$(IRRLICHTPATH)/lib/Win32-gcc -lIrrlicht -lopengl32 -lm
  28. all_win32 clean_win32: SYSTEM=Win32-gcc
  29. all_win32 clean_win32: SUF=.exe
  30. # name of the binary - only valid for targets which set SYSTEM
  31. #DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
  32. DESTPATH = bin/$(Target)$(SUF)
  33.  
  34. all_linux all_win32:
  35. $(warning Building...)
  36. $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
  37.  
  38. clean: clean_linux clean_win32
  39. $(warning Cleaning...)
  40.  
  41. clean_linux clean_win32:
  42. @$(RM) $(DESTPATH)
  43.  
  44. .PHONY: all all_win32 clean clean_linux clean_win32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement