Makefile.wiz 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 = libSDL13.a
  10. TARGET_SHARED = libSDL13.so
  11. SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
  12. ./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
  13. ./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
  14. ./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
  15. ./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
  16. ./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
  17. ./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
  18. ./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
  19. OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
  20. all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
  21. $(TARGET_STATIC): $(OBJECTS)
  22. $(AR) crv $@ $^
  23. $(RANLIB) $@
  24. $(TARGET_SHARED):
  25. $(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1 $(OBJECTS)
  26. ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
  27. ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
  28. config_copy:
  29. cp include/SDL_config_wiz.h include/SDL_config.h
  30. clean:
  31. rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
  32. install:
  33. mkdir -p $(WIZSDK)/lib
  34. mkdir -p $(WIZSDK)/include/SDL13
  35. cp -f $(TARGET_STATIC) $(WIZSDK)/lib
  36. cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
  37. rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
  38. ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
  39. ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
  40. cp $(TARGET_STATIC) ../../toolchain/libs
  41. cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
  42. rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
  43. ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
  44. ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
  45. cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
  46. cp -f include/*.h $(WIZSDK)/include/SDL13/
  47. cp -f include/*.h ../../toolchain/include/SDL13/