Advertisement
konalisp

Untitled

Jul 10th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 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 = 04.Movement
  5. Sources = main.cpp
  6.  
  7. # general compiler settings
  8. CPPFLAGS = -I../../include -I/usr/X11R6/include
  9. CXXFLAGS = -O3 -ffast-math
  10. #CXXFLAGS = -g -Wall
  11.  
  12. #default target is Linux
  13. all: all_linux
  14.  
  15. ifeq ($(HOSTTYPE), x86_64)
  16. LIBSELECT=64
  17. endif
  18.  
  19. # target specific settings
  20. all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11
  21. #-lXcursor
  22. all_linux clean_linux: SYSTEM=Linux
  23. all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
  24. all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
  25. all_win32 clean_win32: SYSTEM=Win32-gcc
  26. all_win32 clean_win32: SUF=.exe
  27. # name of the binary - only valid for targets which set SYSTEM
  28. DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
  29.  
  30. all_linux all_win32:
  31. $(warning Building...)
  32. $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
  33.  
  34. clean: clean_linux clean_win32
  35. $(warning Cleaning...)
  36.  
  37. clean_linux clean_win32:
  38. @$(RM) $(DESTPATH)
  39.  
  40. .PHONY: all all_win32 clean clean_linux clean_win32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement