/*
 * $Source: /mit/olcdev/src/server/olcd/RCS/Imakefile,v $
 * $Id: Imakefile,v 1.27 1992/01/07 20:53:52 lwvanels Exp $
 * Copyright (C) 1991 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file "mit-copyright.h".
 */

/*#define Profiling*/

#ifdef Profiling
LIBSUFFIX=_p
EXTRA_LOAD_FLAGS=-pg
#endif


SRCS=	backup.c data_utils.c db.c s_io.c log.c olcd.c \
	data.c notify.c utils.c list.c acl_files.c \
	requests_olc.c syslog.c statistics.c motd.c \
	requests_admin.c version.c

OBJS=	backup.o data_utils.o db.o s_io.o log.o olcd.o \
	data.o notify.o utils.o list.o acl_files.o \
	requests_olc.o syslog.o statistics.o motd.o \
	requests_admin.o version.o

LOCAL_LIBRARIES=$(COMMONLIB)

#ifdef Profiling
DEFINES=-DPROFILE
.c.o:
	$(CC) -pg -c $(CFLAGS) $*.c
#else
#endif /* Profiling */

DEPLIBS=$(LOCAL_LIBRARIES)

#if HaveZephyr || HaveKerberos
SYS_LIBRARIES=	$(HesiodLib) $(ZephyrLib) $(ComErrLib) $(KerberosLib) $(misc)
#else
SYS_LIBRARIES=	$(HesiodLib) $(ZephyrLib) $(KerberosLib) $(misc)
#endif

olcd:: newvers.sh
	-$(RM) olcd
	sh newvers.sh

version.h::
	sh newvers.sh

NormalProgramTarget(olcd,$(OBJS),$(LOCAL_LIBRARIES),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))

SaberProgramTarget(olcd,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))

depend::
	echo "##### Ignore any warnings about version.h not existing"

DependTarget()
LintTarget()

#ifdef InstallAltLoc
InstallProgram(olcd,$(DESTDIR)/usr/athena/etc)
#else
InstallProgram(olcd,$(DESTDIR)/usr/etc)
#endif

AllTarget(olcd)
