     YYABOX_SRCS = main.c parse.c
     YYABOX_OBJS = main.o parse.o
YYABOX_INST_OBJS = main-inst.o parse.o
     YYCALL_SRCS = yycall.c parse.c
     YYCALL_OBJS = yycall.o parse.o
YYCALL_INST_OBJS = yycall-inst.o parse.o
 LOCAL_LIBRARIES = XawClientLibs
         DEPLIBS = XawClientDepLibs
#ifdef USEBIND
      RESOLV_LIB = -lresolv
#endif
#ifdef MAKEUSER
        PROGRAMS = yycall-test
  INSTALL_TARGET = install_yycall install_desc
#else
#ifdef MAKESYS
        PROGRAMS = yyabox-test
  INSTALL_TARGET = install_yyabox install_desc
#else
        PROGRAMS = yycall-test yyabox-test
  INSTALL_TARGET = install_yycall install_yyabox install_desc
#endif
#endif

      INST_FLAGS = -DINST
         DEFINES = -I..
     CDEBUGFLAGS = -g

AllTarget($(PROGRAMS))

SingleProgramTarget(yyabox,$(YYABOX_OBJS),NullParameter,$(RESOLV_LIB))
SingleProgramTarget(yyabox-inst,$(YYABOX_INST_OBJS),NullParameter,$(RESOLV_LIB))

SingleProgramTarget(yycall,$(YYCALL_OBJS),$(LOCAL_LIBRARIES),$(RESOLV_LIB))
SingleProgramTarget(yycall-inst,$(YYCALL_INST_OBJS),$(LOCAL_LIBRARIES),$(RESOLV_LIB))

ObjectFromSpecialSource(yycall-inst,yycall,$(INST_FLAGS))
ObjectFromSpecialSource(main-inst,main,$(INST_FLAGS))

desc-files:
	MakeDir(../bin/DESC)
	sed -e 's/YYBINDIR/./' -e 's/HOST/localhost/' <yy-system.desc-dist >../bin/DESC/yy-system.desc

yycall-test: yycall desc-files
	MakeDir(../bin)
	cp yycall ../bin/yycall

yyabox-test: yyabox desc-files
	MakeDir(../bin)
	cp yyabox ../bin/yyabox

install_desc:
	MakeDir($(YYLIBDIR)/DESC)
	sed -e 's;YYBINDIR;$(YYLIBDIR);' -e 's;HOST;localhost;' <yy-system.desc-dist >$(YYLIBDIR)/DESC/yy-system.desc

install_yycall: yycall-inst
	MakeDir($(YYBINDIR))
	$(INSTALL) -c $(INSTPGMFLAGS) yycall-inst $(YYBINDIR)/yycall

install_yyabox: yyabox-inst
	MakeDir($(YYBINDIR))
	$(INSTALL) -c $(INSTPGMFLAGS) yyabox-inst $(YYBINDIR)/yyabox

install:: $(INSTALL_TARGET)

DependDependency()

depend::
	$(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(YYABOX_SRCS)
	$(DEPEND) -a $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(YYCALL_SRCS)
