Makefile 862 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Makefile for FileToHeader
  2. Target = FileToHeader
  3. Sources = main.cpp
  4. # general compiler settings
  5. CPPFLAGS = -I../../include
  6. CXXFLAGS = -O3 -ffast-math -Wall
  7. #CXXFLAGS = -g -Wall
  8. #default target is Linux
  9. all: all_linux
  10. ifeq ($(HOSTTYPE), x86_64)
  11. LIBSELECT=64
  12. endif
  13. # target specific settings
  14. all_linux clean_linux: SYSTEM=Linux
  15. all_win32: LDFLAGS = -L../../lib/Win32-gcc
  16. all_win32 clean_win32: SYSTEM=Win32-gcc
  17. all_win32 clean_win32: SUF=.exe
  18. # name of the binary - only valid for targets which set SYSTEM
  19. DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
  20. all_linux all_win32:
  21. $(warning Building...)
  22. $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
  23. clean: clean_linux clean_win32
  24. $(warning Cleaning...)
  25. clean_linux clean_win32:
  26. @$(RM) $(DESTPATH)
  27. .PHONY: all all_win32 clean clean_linux clean_win32