#include "../Kinput2.conf"

SJ3DEF_FILES =  sjhk sjrc sjrk sjsb sjzh

OBJS = jcode.o ../lib/Xsj3clib/code.o
SRCS = jcode.c

DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(XLIB)

#ifdef UseSj3
INCLUDES = -I../include -I../lib/Xsj3clib -I$(SJ3SRC)/sj3lib -I$(SJ3SRC)

#define SjdefTarget(file)	@@\
file: file.EUC			@@\
	rm -f $@		@@\
	./jcode file.EUC > file 

all:: jcode $(SJ3DEF_FILES)
install:: $(SJ3DEF_FILES)

SjdefTarget(sjhk)
SjdefTarget(sjrc)
SjdefTarget(sjrk)
SjdefTarget(sjsb)
SjdefTarget(sjzh)
SingleProgramTarget(jcode,$(OBJS),$(XLIB),)
MakeDirectories(install,$(SJ3DEF_DIR))
InstallMultipleFlags($(SJ3DEF_FILES),$(SJ3DEF_DIR),$(INSTDATFLAGS))

clean::
	$(RM) $(SJ3DEF_FILES)

DependTarget()

#else
all::
clean::
install::
depend::
#endif
