Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. J4A = ../../extra/bin/j4a
  2. ROOT_CLASS_INCLUDES = j4a/j4a_allclasses.include.h
  3. ROOT_CLASS_LOADERS = j4a/j4a_allclasses.loader.h
  4. all: ijkj4a
  5. # test java -> c
  6. JAVA_SRCS = \
  7. java/java/nio/Buffer.java \
  8. java/java/nio/ByteBuffer.java \
  9. java/java/util/ArrayList.java \
  10. java/android/media/AudioTrack.java \
  11. java/android/media/MediaCodec.java \
  12. java/android/media/MediaFormat.java \
  13. java/android/media/PlaybackParams.java \
  14. java/android/os/Build.java \
  15. java/android/os/Bundle.java \
  16. java/tv/danmaku/ijk/media/player/misc/IMediaDataSource.java \
  17. java/tv/danmaku/ijk/media/player/misc/IAndroidIO.java \
  18. java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java \
  19. C_SRCS := $(JAVA_SRCS:java/%.java=j4a/class/%.c)
  20. H_SRCS := $(C_SRCS:%.c=%.h)
  21. $(C_SRCS): j4a/class/%.c: $(J4A)
  22. $(C_SRCS): j4a/class/%.c: java/%.java
  23. ifneq ("$<", "j4a/class/.c")
  24. @mkdir -p $(shell dirname $@)
  25. $(J4A) -c $< -o $@
  26. @cat j4a/class/$*.include.j4a >> $(ROOT_CLASS_INCLUDES)
  27. @echo >> $(ROOT_CLASS_INCLUDES)
  28. @cat j4a/class/$*.loader.j4a >> $(ROOT_CLASS_LOADERS)
  29. @echo >> $(ROOT_CLASS_LOADERS)
  30. endif
  31. ijkj4a: prebuild $(C_SRCS)
  32. prebuild:
  33. @rm -f $(ROOT_CLASS_INCLUDES)
  34. @rm -f $(ROOT_CLASS_LOADERS)
  35. # -----
  36. .PHONY: all clean ijkj4a prebuild
  37. clean:
  38. @rm -f $(C_SRCS)
  39. @rm -f $(H_SRCS)
  40. @rm -f $(ROOT_CLASS_INCLUDES)
  41. @rm -f $(ROOT_CLASS_LOADERS)