#define Gui

LOCLIB=../../hytext/lib/hytext.ExtLib
LOCINCL = -I. -I../../hytext/src
LOCDEF  = -DYY_USE_PROTOS

#include "Imake.inc"

#if HasGcc
CDEBUGFLAGS=-g -O2
XCOMM STD_INCLUDES=-I/usr/local/lib/g++-include
#endif

TARGET=../lib/tex2any

BINDIR=/prvarch/samples

all::
	mkdirhier ../lib

SRCS1 = tex2any.cc
OBJS1 = tex2any.ExtObj

SRCS2 = test.cc
OBJS2 = $(SRCS2:.cc=.ExtObj)

SRCS3 = wxhelp.cc
OBJS3 = $(SRCS3:.cc=.ExtObj)

SRCS4 = tex2help.cc
OBJS4 = $(SRCS4:.cc=.ExtObj)

SRCS5 = c2help.cc
OBJS5 = $(SRCS5:.cc=.ExtObj)

SRCS6 = man2help.cc
OBJS6 = $(SRCS6:.cc=.ExtObj)

SRCS=$(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) $(SRCS6)

SpecialLibraryTarget($(TARGET),$(OBJS1))

all:: $(TARGET).ExtLib

PROGRAMS = test tex2help c2help man2help wxhelp

#ifndef MS_WINDOWS
all:: $(PROGRAMS)
#endif

IDIR=/usr/local/tex2any

install::
        mkdirhier $(IDIR)

InstallSpecialLibrary($(TARGET),$(IDIR))
InstallNonExec(tex2any.h,$(IDIR))


RES2=test.rc
RES3=wxhelp.rc
RES4=tex2help.rc
RES5=c2help.rc
RES6=man2help.rc

Ressource(test,$(RES2))
Ressource(wxhelp,$(RES3))
Ressource(tex2help,$(RES4))
Ressource(c2help,$(RES5))
Ressource(man2help,$(RES6))

#if defined(MS_WINDOWS)
#define Res2	test.res
#define Res3	wxhelp.res
#define Res4	tex2help.res
#define Res5	c2help.res
#define Res6	man2help.res
#else
#define	Res2	/**/
#define	Res3	/**/
#define	Res4	/**/
#define	Res5	/**/
#define	Res6	/**/
#endif

LOCAL_LIBRARIES=$(TARGET).ExtLib

ComplexProgramTarget_2(test,Res2 $(LOCAL_LIBRARIES),$(MESLIBS))
ComplexProgramTarget_3(wxhelp,Res3 $(LOCAL_LIBRARIES),$(MESLIBS))
ComplexProgramTarget_4(tex2help,Res4 $(LOCAL_LIBRARIES),$(MESLIBS))
ComplexProgramTarget_5(c2help,Res5 $(LOCAL_LIBRARIES),$(MESLIBS))
ComplexProgramTarget_6(man2help,Res6 $(LOCAL_LIBRARIES),$(MESLIBS))

PutRessource(test)
PutRessource(wxhelp)
PutRessource(tex2help)
PutRessource(c2help)
PutRessource(man2help)

WorldRule()

InstallNonExec(aiai.ico,$(BINDIR))
InstallNonExec(aiai.xbm,$(BINDIR))
InstallNonExec(help.xbm,$(BINDIR))
InstallNonExec(wxhelp.ico,$(BINDIR))

DoDosSpecial(Imakefile,imakefil)
CpDos(aiai.ico)
CpDos(aiai.xbm)
DoDos(c2help.cc)
DoDos(c2help.def)
DoDos(c2help.rc)
CpDos(help.xbm)
DoDos(man2help.cc)
DoDos(man2help.def)
DoDos(man2help.rc)
DoDos(test.cc)
DoDos(test.def)
DoDos(test.rc)
DoDos(tex2any.cc)
DoDos(tex2any.h)
DoDos(tex2help.cc)
DoDos(tex2help.def)
DoDos(tex2help.rc)
DoDos(wxhelp.cc)
DoDos(wxhelp.def)
DoDos(wxhelp.h)
CpDos(wxhelp.ico)
DoDos(wxhelp.rc)
DoDos(wxhlpblk.h)
