/*
** If you are compiling this under X11R4, use the "#undef Have_X11R5" variant
*/
#define Have_X11R5	/* for X11R5 or X11R6 */
/* #undef Have_X11R5	/* for X11R4 */

/*
** MBINDIR and MLIBDIR are only used if you decide to install the
** viewer to public use.
*/
     MBINDIR = /usr/local/bin
     MLIBDIR = /usr/local/lib/miew

/*
** Even with openwin (and other environments), first try with whatever
** the xmkmf gets for you, and only if that doesn't work, then start
** choosing/editing the commented variants which are provided just as
** examples of possible solutions.
**
**	-lXew	is the normal optimized library (shared if supported)
**	-lXew_d	is the debugged library (if built)
**	-lXew_p	is the profiled library (if built)
*/
       XMULIB = -lXmu
/*     XMULIB = $(OPENWINHOME)/lib/libXmu.a */

       XAWLIB = -lXaw
/*     XAWLIB = -L$(OPENWINHOME)/lib -lXaw */

       XEWLIB = -L../Xew -lXew_d
       MAMLIB = -L../Mam -lMam_d

/*
** Remove comments from the ones you have and the support of which you
** compiled into Xew. If your location for these extra libraries is
** different from /usr/local/lib, you may have to add -L's and/or change
** the EXTRA_LIBRARIES line.
*/
      TIFFLIB = -ltiff
      JPEGLIB = -ljpeg
      RLELIB = -lrle

#ifdef Have_X11R5
   R5DEFINES = -DX11R5
#endif

SYS_LIBRARIES = $(XEWLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) 
EXTRA_LIBRARIES = $(MAMLIB) -L/usr/local/lib $(JPEGLIB) $(TIFFLIB) $(RLELIB) -lm

/*
** -DANSI_INCLUDES	you have ANSI C standard library includes
** -DSYSV_INCLUDES	you have SYSV headers
** (may also compile without either of them, but not recommended)
*/
DEFINES = $(R5DEFINES) -DANSI_INCLUDES

/* INCLUDES = -I/$(OPENWINHOME)/include -I../Xew -I../Mam */

   INCLUDES = -I../Xew -I../Mam

/*
** for gcc
**    CCOPTIONS = -Wall
*/
CCOPTIONS = -Wall

/*
** for getting debug versions
**    CDEBUGFLAGS = -g
*/
CDEBUGFLAGS = -g

/*
** sometimes for HPUX, use..
**    CCOPTIONS = -Aa -D_HPUX_SOURCE 
*/


/*
** ------- NO CONFIGURATION CHANGES BELOW THIS POINT ---------
*/

PROGRAMS = mfmtest mamtest miew

SRCS =	HeaderExt.c \
	display.c \
	filename.c \
	miew.c \
	ui_tools.c \
	mamtest.c \
	mfmtest.c \
	mailcap.c

OBJS =	HeaderExt.o \
	display.o \
	filename.o \
	miew.o \
	ui_tools.o \
	mamtest.o \
	mfmtest.o \
	mailcap.o

MIEW_OBJS = miew.o ui_tools.o display.o HeaderExt.o mailcap.o filename.o

AllTarget($(PROGRAMS))

AllTarget(mfmtest mamtest miew)

NormalProgramTarget(mfmtest,mfmtest.o,,,)
NormalProgramTarget(mamtest,mamtest.o,,,)
NormalProgramTarget(miew,$(MIEW_OBJS),,,)

MakeDirectories(install, $(MLIBDIR))

InstallProgram(miew, $(MBINDIR))
InstallNonExec(eb.gif, $(MLIBDIR))
InstallAppDefaults(Miew)

DependTarget()
