/*
 * 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: /afs/sipb/project/sipb-athena/olh/motif/RCS/Imakefile,v $
 *	$Id: Imakefile,v 1.15 1995/07/01 10:10:43 ghudson Exp $
 *	$Author: ghudson $
 */

/*#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 */
PROFDEFS=-DPROFILE
.c.o:
	$(CC) -pg -c $(CFLAGS) $*.c
#endif

#ifdef XresPath
XRESDEFS=-DXRESOURCES=\"XresPath\"
#endif

#ifdef XbitPath
XBITDEFS=-DXBITMAPS=\"XbitPath\"
#endif

DEFINES= ${PROFDEFS} ${XRESDEFS} ${XBITDEFS} -D_NO_PROTO

DEPLIBS=$(LOCAL_LIBRARIES)
#if defined(SunArchitecture)
SYS_LIBRARIES=	$(ComErrLib) $(HesiodLib) $(MotifLib) $(XLibs) $(XextLib) -lm
#else
SYS_LIBRARIES=	$(ComErrLib) $(HesiodLib) $(MotifLib) $(XLibs) $(XextLib) 
#endif
INCLUDES= -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)
