/*
 * This file is part of the OLH system.
 *
 *      Lucien Van Elsen
 *	MIT Project Athena
 *
 * Copyright (C) 1990 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file "mit-copyright.h".
 *
 *	$Source: /mit/sipb-athena/src/olh/ascii/RCS/Imakefile,v $
 *	$Id: Imakefile,v 1.10 96/03/19 12:17:58 warlord Exp $
 *	$Author: warlord $
 */

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

SRCS=	curses.c get_keyword.c get_number.c get_token.c help.c hooks.c \
	interrupt.c main.c menupath.c olc.c screen.c suggest.c \
	view.c context.c info.c copy.c print.c keyword.c

OBJS=	curses.o get_keyword.o get_number.o get_token.o help.o hooks.o \
	interrupt.o main.o menupath.o olc.o screen.o suggest.o \
	view.o context.o info.o copy.o print.o keyword.o

A_SRCS= anykey.c

A_OBJS= anykey.o

#if DoUsageLog
LOCAL_LIBRARIES=$(MenuLib) $(LOGGERLIB)
#else
LOCAL_LIBRARIES=$(MenuLib)
#endif

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

#ifdef linux
LinuxLibs=	-lbsd
#else
LinuxLibs=
#endif

DEFINES = $(P_DEFINES)

DEPLIBS=$(LOCAL_LIBRARIES)

SYS_LIBRARIES=		$(ComErrLib) $(CursesLib) $(HesiodLib)
A_SYS_LIBRARIES= 	$(TermcapLib) $(LinuxLibs)

INCLUDES= -I.

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

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

NormalProgramTarget(anykey,$(A_OBJS),,,$(A_SYS_LIBRARIES))

SaberProgramTarget(anykey,$(A_SRCS),$(A_OBJS),,$(A_SYS_LIBRARIES))

DependTarget()
LintTarget()

#ifdef InstallAltLoc
InstallProgram(olh_ascii,$(DESTDIR)/usr/athena/bin)
#else
InstallProgram(olh_ascii,$(DESTDIR)/usr/athena)
#endif

AllTarget(olh_ascii anykey)
