🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.4 KiB

  1. # Makefile to build the pandora SDL library
  2. WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
  3. AR = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
  4. RANLIB = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
  5. CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
  6. CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
  7. STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
  8. CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
  9. TARGET_STATIC = libSDL2.a
  10. TARGET_SHARED = libSDL2.so
  11. SOURCES = \
  12. ./src/*.c \
  13. ./src/audio/*.c \
  14. ./src/audio/disk/*.c \
  15. ./src/audio/dsp/*.c \
  16. ./src/audio/dummy/*.c \
  17. ./src/cpuinfo/*.c \
  18. ./src/events/*.c \
  19. ./src/file/*.c \
  20. ./src/haptic/*.c \
  21. ./src/haptic/linux/*.c \
  22. ./src/joystick/*.c \
  23. ./src/joystick/linux/*.c \
  24. ./src/loadso/dlopen/*.c \
  25. ./src/sensor/*.c \
  26. ./src/sensor/dummy/*.c \
  27. ./src/stdlib/*.c \
  28. ./src/thread/*.c \
  29. ./src/thread/pthread/SDL_syscond.c \
  30. ./src/thread/pthread/SDL_sysmutex.c \
  31. ./src/thread/pthread/SDL_syssem.c \
  32. ./src/thread/pthread/SDL_systhread.c \
  33. ./src/timer/*.c \
  34. ./src/timer/unix/*.c \
  35. ./src/video/*.c \
  36. ./src/video/dummy/*.c \
  37. ./src/video/pandora/*.c \
  38. OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
  39. all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
  40. $(TARGET_STATIC): $(OBJECTS)
  41. $(AR) crv $@ $^
  42. $(RANLIB) $@
  43. $(TARGET_SHARED):
  44. $(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1 $(OBJECTS)
  45. ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
  46. ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
  47. config_copy:
  48. cp include/SDL_config_wiz.h include/SDL_config.h
  49. clean:
  50. rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
  51. install:
  52. mkdir -p $(WIZSDK)/lib
  53. mkdir -p $(WIZSDK)/include/SDL2
  54. cp -f $(TARGET_STATIC) $(WIZSDK)/lib
  55. cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
  56. rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
  57. ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
  58. ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
  59. cp $(TARGET_STATIC) ../../toolchain/libs
  60. cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
  61. rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
  62. ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
  63. ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
  64. cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
  65. cp -f include/*.h $(WIZSDK)/include/SDL2/
  66. cp -f include/*.h ../../toolchain/include/SDL2/