# Automatically generated file.  DO NOT EDIT
# This file is part of the
#
#      Delta Project  (ConversationBuilder)
#      Human-Computer Interaction Laboratory
#      University of Illinois at Urbana-Champaign
#      Department of Computer Science
#      1304 W. Springfield Avenue
#      Urbana, Illinois 61801
#      USA
#
#      c 1989,1990,1991,1992 Board of Trustees
#              University of Illinois
#              All Rights Reserved
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. No author or distributor accepts
# responsibility to anyone for the consequences of using this code
# or for whether it serves any particular purpose or works at all,
# unless explicitly stated in a written agreement.
#
# Everyone is granted permission to copy, modify and redistribute
# this code, except that the original author(s) must be given due credit,
# and this copyright notice must be preserved on all copies.
#
#      Author:  Doug Bogia (bogia@cs.uiuc.edu)
#  		 Mark Allender (allender@cs.uiuc.edu)
#
#      Project Leader:  Simon Kaplan (kaplan@cs.uiuc.edu)
#      Direct enquiries to the project leader please.
#

RANLIB=ranlib

MAKE=make

AR=ar

MAKEDEPEND=makedepend

CP=cp

CHMOD=chmod

MKDIR=mkdir

LIB_PERMISSIONS=644

INCLUDE_PERMISSIONS=644

PROG_PERMISSIONS=755

TOP=/delta/scratch/widgets

LIB_DIR=$(TOP)/lib

BIN_DIR=$(TOP)/bin

INCLUDE_DIR=$(TOP)/include

LIB_PATH=-L$(LIB_DIR) -L/delta/std/lib

INCLUDE_PATH=-I$(INCLUDE_DIR) -I/delta/std/include

CB_EXEC_PATH=$BIN_DIR:/delta/stable/all:/delta/std/all

CC=cc
# Place any other CFLAGS in the SYS_C_FLAGS line
SYS_C_FLAGS=$(INCLUDE_PATH) -D_NO_PROTO -g

CFLAGS=$(SYS_C_FLAGS)

# Give us a default for SUBDIRS (assume directories do not have subdirs).
SUBDIRS=""

all: includes libs progs

World: Makefiles includes depend libs progs

# Comments in these makefiles begin with a pound sign (#), but must not
# be placed in the leftmost column.

PROGS=clerk
OBJS = clerk.o
SRCS = clerk.c
LIBS=-lmb -lglobal

CFLAGS=$(SYS_C_FLAGS) -DUSE_WIDGET_SERVER

Makefile: $(TOP)/util/mfmerge $(TOP)/Makefile.global \
	  $(TOP)/Makefile.progs Makefile.tmpl
	@$(TOP)/util/mfmerge

clerk : $(OBJS)
	$(CC) $(CFLAGS) -o clerk $(LIB_PATH) $(OBJS) $(LIBS)

install:: $(PROGS)
	@if [ -n "$(PROGS)" ] ; then\
	  $(CP) $(PROGS) $(BIN_DIR);\
	  (cd $(BIN_DIR); $(CHMOD) $(PROG_PERMISSIONS) $(PROGS));\
	fi

install::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making install in `pwd`";\
	     $(MAKE) install);\
	  done;\
	fi

libs:: $(LOCAL_LIBS)
	@if [ -n "$(LOCAL_LIBS)" ] ; then\
	  echo "Installing $(LOCAL_LIBS) in $(LIB_DIR)";\
	  $(CP) $(LOCAL_LIBS) $(LIB_DIR);\
	  (cd $(LIB_DIR); $(CHMOD) $(LIB_PERMISSIONS) $(LOCAL_LIBS));\
	  if [ -n "$(RANLIB)" ] ; then\
	    (echo "Running ranlib"; cd $(LIB_DIR); $(RANLIB) $(LOCAL_LIBS));\
	  fi;\
	fi

libs::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making libs in `pwd`";\
	     $(MAKE) libs);\
	  done;\
	fi

includes::  $(INCLUDES)
	@if [ -n "$(INCLUDES)" ] ; then\
	  echo "Installing $(INCLUDES) in $(INCLUDE_DIR)";\
	  $(CP) $(INCLUDES) $(INCLUDE_DIR);\
	  (cd $(INCLUDE_DIR); $(CHMOD) $(INCLUDE_PERMISSIONS) $(INCLUDES));\
	fi

includes::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making includes in `pwd`";\
	     $(MAKE) includes);\
	  done;\
	fi

progs:: $(PROGS)

progs::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making progs in `pwd`";\
	     $(MAKE) progs);\
	  done;\
	fi

Makefiles::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making Makefile in `pwd`";\
	     $(MAKE) -f Makefile.tmpl Makefile TOP=$(TOP); $(MAKE) Makefiles);\
	  done;\
	fi

depend:: localdepend
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making depend in `pwd`";\
	     $(MAKE) depend);\
	  done;\
	fi

localdepend::
	@if [ -n "$(PROGS)" -o -n "$(LOCAL_LIBS)" ] ; then\
	  echo "Making dependencies in `pwd`";\
	  $(MAKEDEPEND) $(INCLUDE_PATH) *.c;\
	fi

clean:: localclean
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making clean in `pwd`";\
	     $(MAKE) clean);\
	  done;\
	fi

localclean::
	rm -f *.o *~ core a.out \#*

veryclean:: localveryclean
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making veryclean in `pwd`";\
	     $(MAKE) veryclean)\
	  done;\
	fi

localveryclean:: localclean
	rm -f $(PROGS) $(LOCAL_LIBS) Makefile Makefile.bak

uninstall::
	@if [ -n "$(SUBDIRS)" ]; then\
	  for i in $(SUBDIRS); do\
	    (cd $$i;\
	     echo "Making uninstall in `pwd`";\
	     $(MAKE) uninstall)\
	  done;\
	fi

uninstall:: localveryclean
	@if [ -n "$(PROGS)" ] ; then\
	  (cd $(BIN_DIR); rm -f $(PROGS));\
	fi
	@if [ -n "$(LOCAL_LIBS)" ] ; then\
	  (cd $(LIB_DIR); rm -f $(LOCAL_LIBS));\
	fi
	@if [ -n "$(INCLUDES)" ] ; then\
	  (cd $(INCLUDE_DIR); rm -f $(INCLUDES));\
	fi
# DO NOT DELETE THIS LINE -- make depend depends on it.

clerk.o: /usr/include/stdio.h /usr/include/sys/types.h
clerk.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
clerk.o: /usr/include/sys/stat.h /usr/include/errno.h
clerk.o: /usr/include/sys/errno.h /usr/include/fcntl.h
clerk.o: /usr/include/sys/fcntlcom.h /usr/include/string.h
clerk.o: /delta/scratch/widgets/include/mbus/api.h
clerk.o: /delta/scratch/widgets/include/mbus/mbus.h
clerk.o: /delta/scratch/widgets/include/mbus/keyword.h
clerk.o: /delta/scratch/widgets/include/getopt.h
clerk.o: /delta/scratch/widgets/include/config.h
clerk.o: /delta/scratch/widgets/include/cb-defs.h
