選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

103 行
2.7 KiB

  1. jnidir = $(libdir)/jni
  2. libcaca_javadir = $(datadir)/java
  3. java_jar = libjava.jar
  4. if USE_JAVA
  5. jni_LTLIBRARIES = libcaca-java.la
  6. libcaca_java_DATA = $(java_jar)
  7. noinst_DATA = examples/Driver.class examples/TrueColor.class
  8. endif
  9. java_src = $(wildcard $(srcdir)/org/zoy/caca/*.java)
  10. java_jni_headers = \
  11. org_zoy_caca_Attribute.h \
  12. org_zoy_caca_Caca.h \
  13. org_zoy_caca_Canvas.h \
  14. org_zoy_caca_Display.h \
  15. org_zoy_caca_Dither.h \
  16. org_zoy_caca_Event.h \
  17. org_zoy_caca_Font.h
  18. java_jni_src = \
  19. org_zoy_caca_Attribute.c \
  20. org_zoy_caca_Caca.c \
  21. org_zoy_caca_Canvas.c \
  22. org_zoy_caca_Display.c \
  23. org_zoy_caca_Dither.c \
  24. org_zoy_caca_Event.c \
  25. org_zoy_caca_Font.c
  26. java_jni_classes = \
  27. org/zoy/caca/Attribute.class \
  28. org/zoy/caca/Caca.class \
  29. org/zoy/caca/Canvas.class \
  30. org/zoy/caca/Display.class \
  31. org/zoy/caca/Dither.class \
  32. org/zoy/caca/Event.class \
  33. org/zoy/caca/Font.class
  34. JAVAH_FLAGS = -d . -classpath .
  35. $(java_jni_classes): $(java_src)
  36. $(JAVAC) -d . $(java_src)
  37. $(JAR) -cf $(java_jar) org
  38. # Javah does not update the file if it detects that there is nothing to do,
  39. # hence the `touch` so that javah is not run at every `make`.
  40. org_zoy_caca_Attribute.h: org/zoy/caca/Attribute.class
  41. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Attribute
  42. @touch org_zoy_caca_Attribute.h
  43. org_zoy_caca_Caca.h: org/zoy/caca/Caca.class
  44. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Caca
  45. @touch org_zoy_caca_Caca.h
  46. org_zoy_caca_Canvas.h: org/zoy/caca/Canvas.class
  47. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Canvas
  48. @touch org_zoy_caca_Canvas.h
  49. org_zoy_caca_Display.h: org/zoy/caca/Display.class
  50. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Display
  51. @touch org_zoy_caca_Display.h
  52. org_zoy_caca_Dither.h: org/zoy/caca/Dither.class
  53. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Dither
  54. @touch org_zoy_caca_Dither.h
  55. org_zoy_caca_Event.h: org/zoy/caca/Event.class
  56. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Event
  57. @touch org_zoy_caca_Event.h
  58. org_zoy_caca_Font.h: org/zoy/caca/Font.class
  59. $(JAVAH) $(JAVAH_FLAGS) org.zoy.caca.Font
  60. @touch org_zoy_caca_Font.h
  61. CLEANFILES = $(noinst_DATA) $(java_jar) \
  62. org/zoy/caca/*.class org_zoy_caca_[A-Z]*.h
  63. EXTRA_DIST = README
  64. if USE_JAVA
  65. BUILT_SOURCES = $(java_jni_headers) $(java_jni_classes)
  66. endif
  67. libcaca_java_la_CPPFLAGS = $(JAVA_CFLAGS)
  68. libcaca_java_la_SOURCES = \
  69. caca_java_common.h \
  70. caca_java_common.c \
  71. $(java_jni_src)
  72. #nodist_libcaca_java_la_SOURCES = \
  73. # $(java_jni_headers)
  74. libcaca_java_la_LDFLAGS = -shared $(JAVA_LIBS)
  75. libcaca_java_la_LIBADD = ../caca/libcaca.la
  76. examples/Driver.class: examples/Driver.java
  77. $(JAVAC) $^
  78. examples/TrueColor.class: examples/TrueColor.java
  79. $(JAVAC) $^