/*
 * This file is part of the OLH system.
 *
 *	Chris Van Haren
 *      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/olhdev/src/motif/RCS/Imakefile,v $
 *	$Id: Imakefile,v 1.8 1992/05/01 20:47:46 lwvanels Exp $
 *	$Author: lwvanels $
 */

/*#define Profiling*/

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

SRCS = main.c menupath.c visual.c callbacks.c keywords.c ButtonCB.c \
	Context.c Cursor.c File.c Highlight.c Scroll.c XmListUtils.c MuMenu.c \
	GetDefault.c help.c invoke.c converters.c

OBJS = main.o menupath.o visual.o callbacks.o keywords.o ButtonCB.o \
	Context.o Cursor.o File.o Highlight.o Scroll.o XmListUtils.o MuMenu.o \
	GetDefault.o help.o invoke.o converters.o

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

#ifdef Profiling
/* turn off prototyping in motif headers because they're broken */
DEFINES= -DPROFILE -D_NO_PROTO
.c.o:
	$(CC) -pg -c $(CFLAGS) $*.c
#else
/* turn off prototyping in motif headers because they're broken */
DEFINES= -D_NO_PROTO
#endif /* Profiling */

DEPLIBS=$(LOCAL_LIBRARIES)
SYS_LIBRARIES=	$(ComErrLib) $(HesiodLib) $(MotifLib) $(XLibs) 
INCLUDES= -I/mit/motif/include -I.

Olh:  Olh.cpp
	$(RM) Olh
	$(CPP) -P Olh.cpp > Olh

NormalProgramTarget(olh_motif,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
SaberProgramTarget(olh_motif,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))

DependTarget()
LintTarget()

#ifdef InstallAltLoc
InstallProgram(olh_motif,$(DESTDIR)/usr/athena/bin)
InstallNonExec(Olh,$(DESTDIR)/usr/athena/lib/X11/app-defaults)
#else
InstallProgram(olh_motif,$(DESTDIR)/usr/athena)
InstallNonExec(Olh,$(DESTDIR)/usr/lib/X11/app-defaults)
#endif

clean::
	$(RM) Olh

AllTarget(olh_motif Olh)
