/**/# Imakefile file for xdaliclock, Copyright (c) 1994 Jamie Zawinski.
/**/#
/**/#
/**/# If your system doesn't have the select() system call, use -DNO_SELECT.
/**/# This will make the usleep() system call be used instead (this pauses
/**/# for the given number of microseconds).  If your system doesn't have
/**/# either select() or usleep(), you've got some hacking to do...
/**/#
/**/# If you don't have the SHAPE extension, you shouldn't pass -DSHAPE.
/**/# (Normally this happens automatically via `ExtensionDefines', or,
/**/# in R6, `PervasiveExtensionDefines'.)
/**/#
/**/# (MAKE.COM and MAKEFILE.MMS are for building on VMS; Jamie doesn't
/**/# know anything about VMS, so don't bother asking him.)
/**/#
/**/#
#ifdef PervasiveExtensionDefines
# define DaliShapeDefines PervasiveExtensionDefines ExtensionDefines
#else
# define DaliShapeDefines ExtensionDefines
#endif
          DEFINES = -DBUILTIN_FONT -DBUILTIN_FONT_2 DaliShapeDefines
         INCLUDES = -I./numbers -I./numbers2 $(TOP_INCLUDES)
  LOCAL_LIBRARIES = $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB)
             SRCS = xdaliclock.c digital.c colors.c resources.c \
                    visual.c overlay.c hsv.c usleep.c
             OBJS = xdaliclock.o digital.o colors.o resources.o \
                    visual.o overlay.o hsv.o usleep.o
         VMSFILES = make.com makefile.mms xdaliclock.hlp
         TARFILES = README xdaliclock.man Imakefile Makefile.simple $(SRCS) \
                    version.h xdaliclock.h resources.h visual.h usleep.h \
		    hsv.h vroot.h ad2c XDaliClock.ad XDaliClock_ad.h \
		    $(VMSFILES) \
		    numbers/$(STAR).$(STAR) numbers2/$(STAR).$(STAR)
              TAR = gtar
         COMPRESS = gzip --verbose --best
     COMPRESS_EXT = gz
/**/#    COMPRESS = compress
/**/#COMPRESS_EXT = Z
               SH = /bin/sh
             STAR = *

all::

/**/# Build this before calling makedepend.
depend:: XDaliClock_ad.h

ComplexProgramTarget(xdaliclock)
InstallAppDefaults(XDaliClock)

colors.o: xdaliclock.h hsv.h resources.h visual.h
digital.o: xdaliclock.h resources.h usleep.h
hsv.o: hsv.h
overlay.o: visual.h
resources.o: resources.h
visual.o: resources.h visual.h
xdaliclock.o: xdaliclock.h XDaliClock_ad.h version.h resources.h visual.h

XDaliClock_ad.h: XDaliClock.ad
	$(SH) ad2c $< > $@

clean::
	$(RM) XDaliClock_ad.h


/**/# Rule to build the VMS help file from the Unix man page...
xdaliclock.hlp: xdaliclock.man
	@echo building $@... ; \
	( echo '1 XDALICLOCK' ; \
	  nroff -man < $< \
	  | sed -e 's/.//g' -e 's/^ *Page [0-9].*//' \
		-e 's/^ *XDaliClock(.*//' \
		-e 's/^     //' \
		-e 's/^NAME.*//;s/^SYNOPSIS//;s/^DESCRIPTION//' \
		-e 's/\(Copyright\) .*c.*\(1991\)/\1 (C) \2/' \
		-e 's/^\([A-Z][A-Z]*\) \([A-Z][A-Z]*\)/\1_\2/' \
		-e 's/^\([A-Z]\)/2 \1/' \
	  | more -flsu | cat ) \
	  > $@
clean::
	$(RM) xdaliclock.hlp


/**/# This really makes me sick...
tar: xdaliclock.hlp XDaliClock_ad.h
	@NAME=`sed -n							    \
  's/.* v\([0-9]\.[0-9][0-9]*\).*/xdaliclock-\1/p' version.h` ;		    \
  rm -f $$NAME ; ln -s . $$NAME ;					    \
  sh ./xdaliclock.lsm.sh > xdaliclock.lsm.$$$$ ;			    \
  mv xdaliclock.lsm.$$$$ xdaliclock.lsm ;				    \
  echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;		    \
   $(TAR) -vchf - `echo $(TARFILES)				    	    \
   | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `				    \
   | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;			    \
  rm $$NAME ;								    \
  echo "" ;								    \
  ls -lgF $${NAME}.tar.$(COMPRESS_EXT) ;				    \
  echo "" ;
