SRCS1 =	xtmrecord.c intbox.c version.c \
	wintotemp.c clrpadbits.c temptoint.c getrectw.c \
	gettmp.c matdtoint.c copymatd.c wrchk.c wrchk2.c \
	makef.c findchild.c findmouse.c getmouse.c \
	gettop.c getroot.c getcurscr.c clipwin.c chkopen.c \
	sigcatch.c xerror.c compress.c checksum.c readchk.c \
	chk_copy.c write_i_a.c

OBJS1 = xtmrecord.o intbox.o version.o wintotemp.o \
	clrpadbits.o temptoint.o getrectw.o gettmp.o \
	matdtoint.o copymatd.o wrchk.o wrchk2.o makef.o \
	findchild.o findmouse.o getmouse.o gettop.o getroot.o \
	getcurscr.o clipwin.o chkopen.o sigcatch.o xerror.o \
	compress.o checksum.o readchk.o chk_copy.o write_i_a.o

SRCS2 = xtmconvert.c tranin.c tranout.c getkey.c chk_copy.c \
	write_i_a.c inttoout.c outtoint.c inttosum.c sumtoint.c \
	xwdtomatd.c version.c inttomatd.c matdtoint.c \
	wrchk.c wrchk2.c getint.c readchk.c makef.c checksum.c \
	getkeysym.c xtmbuttons.c matdtoxwd.c swaplong.c \
	swapshort.c gettmp.c copymatd.c clrpadbits.c compress.c 

OBJS2 = xtmconvert.o tranin.o tranout.o getkey.o chk_copy.o \
	write_i_a.o inttoout.o outtoint.o inttosum.o sumtoint.o \
	xwdtomatd.o version.o inttomatd.o matdtoint.o wrchk.o \
	wrchk2.o getint.o readchk.o makef.o getkeysym.o \
	xtmbuttons.o matdtoxwd.o swaplong.o swapshort.o gettmp.o \
	copymatd.o clrpadbits.o compress.o checksum.o

SRCS3 = xtmexecute.c exmatch.c inttotemp.c temptoint.c \
	getrectw.c wintotemp.c clrpadbits.c matdtoint.c \
	inttomatd.c gettmp.c copymatd.c wrchk.c wrchk2.c \
	getint.c readchk.c makef.c findchild.c findmouse.c \
	getmouse.c gettop.c getroot.c getcurscr.c clipwin.c \
	chkopen.c sigcatch.c xerror.c getkeysym.c xtmbuttons.c \
	matdtoxwd.c swaplong.c swapshort.c compress.c checksum.c \
	version.c

OBJS3 = xtmexecute.o exmatch.o inttotemp.o temptoint.o getrectw.o \
	wintotemp.o clrpadbits.o matdtoint.o inttomatd.o gettmp.o \
	copymatd.o wrchk.o wrchk2.o getint.o readchk.o \
	makef.o findchild.o findmouse.o getmouse.o gettop.o \
	getroot.o getcurscr.o clipwin.o chkopen.o sigcatch.o \
	xerror.o getkeysym.o xtmbuttons.o matdtoxwd.o swaplong.o \
	swapshort.o compress.o checksum.o version.o

PROGRAMS= xtmrecord xtmconvert xtmexecute

DEFINES= -I.

LOCAL_LIBRARIES = $(EXTENSIONLIB) $(XLIB)

ComplexProgramTarget_1(xtmrecord,$(LOCAL_LIBRARIES),)
ComplexProgramTarget_2(xtmconvert,$(LOCAL_LIBRARIES),)
ComplexProgramTarget_3(xtmexecute,$(LOCAL_LIBRARIES),)

InstallManPage(xtmrecord,$(MANDIR))
InstallManPage(xtmconvert,$(MANDIR))
InstallManPage(xtmexecute,$(MANDIR))

version.rm:
        rm -f version.c
        rm -f version.o

version.o:	version.rm
	-echo 'char version[]="@(#)'built `date "+%D %T"`'";' > version.c
	-echo 'char options[]="@(#)compile opts: ' ${CFLAGS}'";' >> version.c
	$(CC) $(CFLAGS) -c version.c
