Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -62,10 +62,14 @@ LN_S = @LN_S@ MKDIR_P = mkdir -p INSTALL = @INSTALL@ SHELL = @SHELL@ MSGFMT = @MSGFMT@ +JAVAC = @JAVAC@ +JAVACFLAGS = @JAVACFLAGS@ +JAR = @JAR@ +WINDRES = @WINDRES@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ plugindir ?= ${libdir}/${PACKAGE} @@ -81,30 +85,32 @@ OBJS1 = ${SRCS:.c=.o} OBJS2 = ${OBJS1:.cc=.o} OBJS3 = ${OBJS2:.cxx=.o} OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} -OBJS6 = ${OBJS5:.m=.o} -OBJS7 = ${OBJS6:.mm=.o} -OBJS8 = ${OBJS7:.py=.pyc} -OBJS9 = ${OBJS8:.xpm=.o} -OBJS += ${OBJS9:.S=.o} +OBJS6 = ${OBJS5:.java=.class} +OBJS7 = ${OBJS6:.m=.o} +OBJS8 = ${OBJS7:.mm=.o} +OBJS9 = ${OBJS8:.py=.pyc} +OBJS10 = ${OBJS9:.rc=.o} +OBJS11 = ${OBJS10:.S=.o} +OBJS += ${OBJS11:.xpm=.o} LIB_OBJS = ${OBJS:.o=.lib.o} PLUGIN_OBJS = ${OBJS:.o=.plugin.o} MO_FILES = ${LOCALES:.po=.mo} .SILENT: .SUFFIXES: -.SUFFIXES: .beam .c .c.dep .cc .cc.dep .cxx .cxx.dep .d .erl .lib.o .mo .m .m.dep .mm .mm.dep .o .plugin.o .po .py .pyc .xpm .S .S.dep +.SUFFIXES: .beam .c .c.dep .cc .cc.dep .class .cxx .cxx.dep .d .erl .lib.o .java .mo .m .m.dep .mm .mm.dep .o .plugin.o .po .py .pyc .rc .S .S.dep .xpm .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales all: ${MAKE} ${MFLAGS} subdirs ${MAKE} ${MFLAGS} depend - ${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} locales + ${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales subdirs: for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} || exit 1; \ @@ -121,11 +127,11 @@ test $$i -nt .deps && regen=1; \ deps="$$deps $$i.dep"; \ ;; \ esac; \ done; \ - if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \ + if test x"$$regen" = x"1" -a x"$$deps" != x""; then \ ${DEPEND_STATUS}; \ if ${MAKE} ${MFLAGS} $$deps && cat $$deps >.deps; then \ rm -f $$deps; \ ${DEPEND_OK}; \ else \ @@ -147,10 +153,26 @@ if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ fi + +${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} + ${LINK_STATUS} + if test x"${JAR_MANIFEST}" != x""; then \ + if ${JAR} cfm ${JARFILE} ${JAR_MANIFEST} ${OBJS}; then \ + ${LINK_OK}; \ + else \ + ${LINK_FAILED}; \ + fi \ + else \ + if ${JAR} cf ${JARFILE} ${OBJS}; then \ + ${LINK_OK}; \ + else \ + ${LINK_FAILED}; \ + fi \ + fi ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LINK_STATUS}; \ if ${LD} -o $@ ${LIB_OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ @@ -279,10 +301,18 @@ if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi + +.java.class: + ${COMPILE_STATUS} + if ${JAVAC} ${JAVACFLAGS} $<; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi .m.o: ${COMPILE_STATUS} if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ @@ -340,31 +370,17 @@ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi -.xpm.o: +.rc.o .rc.lib.o .rc.plugin.o: ${COMPILE_STATUS} - if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ + if ${WINDRES} ${CPPFLAGS} -J rc -O coff -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi -.xpm.lib.o: - ${COMPILE_LIB_STATUS} - if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ - ${COMPILE_LIB_OK}; \ - else \ - ${COMPILE_LIB_FAILED}; \ - fi -.xpm.plugin.o: - ${COMPILE_PLUGIN_STATUS} - if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ - ${COMPILE_PLUGIN_OK}; \ - else \ - ${COMPILE_PLUGIN_FAILED}; \ - fi .S.o: ${COMPILE_STATUS} if ${AS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ @@ -380,10 +396,32 @@ fi .S.plugin.o: ${COMPILE_PLUGIN_STATUS} if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_PLUGIN_OK}; \ + else \ + ${COMPILE_PLUGIN_FAILED}; \ + fi + +.xpm.o: + ${COMPILE_STATUS} + if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi +.xpm.lib.o: + ${COMPILE_LIB_STATUS} + if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ + ${COMPILE_LIB_OK}; \ + else \ + ${COMPILE_LIB_FAILED}; \ + fi +.xpm.plugin.o: + ${COMPILE_PLUGIN_STATUS} + if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ + ${COMPILE_PLUGIN_OK}; \ else \ ${COMPILE_PLUGIN_FAILED}; \ fi install: ${LIB} ${STATIC_LIB} ${STATIC_PIC_LIB} ${PLUGIN} ${PROG} install-extra