# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = .
CWD = .
CONFIGSRC = /source/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

IMAKE= imake
IFLAGS= -I$(IRULESRC) -DTOPDIR=/source
XIFLAGS= -I$(ATHXLIBDIR)/X11/config -DUseInstalled

ICONFIGFILE = ${IRULESRC}/Imake.tmpl ${IRULESRC}/Imake.rules \
	${IRULESRC}/site.def Imakefile
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = ${IRULESRC}/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

AFSDIR=/usr/transarc

LINTCFLAG=-o
LINTFLAGS=$(DEFINES) -I/usr/athena/include

INSTALL=install -c
RANLIB=\:
CC=cc
LD=cc
AS=as
RM=rm -f
CDEBUG=-O2

CFLAGS=$(CDEBUG) -DSOLARIS -DSYSV -DPOSIX -I/usr/openwin/include $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L/usr/gcc/lib -L/usr/ccs/lib -L/usr/openwin/lib -L$(ATHLIBDIR)
LDLIBS=/usr/athena/lib/libresolv.a -lsocket -lnsl -lc /usr/ucblib/libucb.a -lelf -ldl

all::
install:: install_dirs
install_dirs::
install::
install.man::

clean::
depend::

FRC::

###########################################################################
# Project inclusion
###########################################################################

###########################################################################
# start of Imakefile
###########################################################################

SHELL         = /bin/sh
DEST          = /mit/sipb/bin
MANDEST       = /mit/sipb/man/man1
EXTHDRS	      =
HDRS          = bitio.h\
		compat.h\
		freeze.h\
		huf.h\
		lz.h\
		patchlevel.h
LDFLAGS       =

MACH_DEP_FLAGS = -DFAST -DSOLARIS

CFLAGS        = -DBITS=16 -O -DBSD $(MACH_DEP_FLAGS)

LINTFLAGS     = -DBITS=15 -DCOMPAT -DDEBUG -DGATHER_STAT -x -DFAST

MAKEFILE      = makefile

OBJS          = bitio.o\
		debug.o\
		decode.o\
		default.o\
		encode.o\
		freeze.o\
		huf.o\
		lz.o

PROGRAM       = freeze

CATMAN        = freeze.man

MAN           = freeze.1

SRCS          = bitio.c\
		debug.c\
		decode.c\
		default.c\
		encode.c\
		freeze.c\
		huf.c\
		lz.c

all::            $(PROGRAM) statist freeze.1 statist.1

.SUFFIXES:       .man .1

.1.man:
		nroff -man < $< > $@

.c.o:
		$(CC) -c $(CFLAGS) $(OPTIONS) $<

prog:            $(PROGRAM) statist

man:            $(CATMAN)

lint:           $(SRCS)
		lint $(LINTFLAGS) $(SRCS) > lint.out

$(PROGRAM):     $(OBJS)
		$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

statist: statist.o lz.o
		$(CC) $(CFLAGS) $(LDFLAGS) -o statist statist.o lz.o $(LIBS)

clobber:        clean
		rm -f $(PROGRAM) statist *.man \#* *~

install::        all
		install -c -s statist $(DESTDIR)$(DEST)
		install -c -s freeze $(DESTDIR)$(DEST)
		-ln -s freeze $(DESTDIR)$(DEST)/melt
		-ln -s freeze $(DESTDIR)$(DEST)/fcat
		-ln -s freeze $(DESTDIR)$(DEST)/unfreeze
		install -c -m 0444 freeze.1 $(DESTDIR)$(MANDEST)/freeze.1
		-rm -f $(DESTDIR)$(MANDEST)/melt.1 $(DESTDIR)$(MANDEST)/fcat.1
		for i in melt.1 fcat.1 unfreeze.1; do \
			echo ".so man1/freeze.1" > $(DESTDIR)$(MANDEST)/$$i; \
		done
		install -c -m 0444 statist.1 $(DESTDIR)$(MANDEST)/statist.1
clean::;         rm -f *.o *.b .,* core *.out

patch:;         rm -f patch.out
		-for i in ../distribution/* ; do \
		(diff -c $$i `basename $$i` >> patch.out); \
		done

$(CATMAN):      $(MAN)
		nroff -man < $(MAN) > $(CATMAN)

bitio.o: freeze.h compat.h bitio.h
debug.o: freeze.h compat.h huf.h bitio.h
decode.o: freeze.h compat.h huf.h bitio.h
default.o: freeze.h compat.h
encode.o: freeze.h compat.h lz.h huf.h bitio.h
freeze.o: freeze.h compat.h lz.h huf.h patchlevel.h
huf.o: freeze.h compat.h huf.h bitio.h
lz.o: freeze.h compat.h lz.h
statist.o: freeze.h compat.h lz.h

Makefile:: $(ICONFIGFILE)
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(IFLAGS) $(IPROJ) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	rm -f *~ *.o *.a core a.out

Makefiles::

###########################################################################
# dependencies generated by makedepend

