/*
 * $Source: /mit/olcdev/highlander/src/server/olcd/RCS/Imakefile,v $
 * $Id: Imakefile,v 1.29 1997/05/22 21:03:09 bert Exp bert $
 * 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


DEFINES		= 	$(PROJECT_DEFS)

SRCS=   backup.c backup-bin.c backup-dump.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 my_vsnprintf.c

OBJS=	backup.o backup-bin.o backup-dump.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 my_vsnprintf.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) $(EXTRA_LIBRARIES)
#else
SYS_LIBRARIES=	$(HesiodLib) $(ZephyrLib) $(KerberosLib) $(misc)\
		$(EXTRA_LIBRARIES)
#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()

InstallProgram(olcd,$(DESTDIR)/usr/athena/etc)

AllTarget(olcd)
