Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #
  2. # meg4/platform/raylib/Makefile
  3. #
  4. # Copyright (C) 2023 bzt
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. #
  20. # @brief The raylib Makefile
  21. #
  22. BACKEND=raylib
  23. # MacOS
  24. ifneq ("$(wildcard /Library/Frameworks/raylib*)","")
  25. PACKAGE = MacOS
  26. CFLAGS = -I/Library/Frameworks/raylib.framework/Headers -I/Library/Frameworks/raylib.framework/Versions/A/Headers -D_MACOS_=1 -x objective-c -fobjc-exceptions
  27. LIBS = -F/Library/Frameworks -framework raylib -framework GL -framework OpenAL -framework AppKit
  28. else
  29. # Windows MinGW
  30. ifneq ("$(wildcard /bin/*.exe)","")
  31. PACKAGE = Win
  32. LDFLAGS += -mwindows -static-libgcc
  33. LIBS += -Wl,--nxcompat -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive
  34. ifneq ("$(wildcard raylib/*)","")
  35. CFLAGS += -I./raylib/src
  36. EXTRA += ./raylib/src/raylib.a
  37. else
  38. LIBS += -lraylib
  39. endif
  40. LIBS += -lGL -luser32 -lcomdlg32 -lshlwapi -lws2_32
  41. else
  42. # Linux
  43. PACKAGE = Linux
  44. ifneq ("$(wildcard raylib/*)","")
  45. CFLAGS += -I./raylib/src
  46. EXTRA += ./raylib/src/libraylib.a
  47. else
  48. LIBS += -lraylib
  49. endif
  50. LIBS += -lGL -lm -ldl -lpthread
  51. endif
  52. endif
  53. USE_C99=1
  54. include ../common.mk
  55. ifneq ("$(wildcard raylib/*)","")
  56. raylib/src/libraylib.a: raylib/src/config.h
  57. @make --no-print-directory -s -C raylib/src all PLATFORM=PLATFORM_DESKTOP
  58. endif
  59. static-raylib:
  60. git clone https://github.com/raysan5/raylib.git
  61. @cp config.h raylib/src