/**/# If you want to install the help files for olvwm, set HasInfoFiles to YES
#define HasInfoFiles	YES

/**/# If you haven't installed olwm from xview3 or from Sun's OpenWindows,
/**/# and you want to install the olwm man page (which discusses most of the
/**/# window operations), defind NeedOlwmManPage to YES
#define NeedOlwmManPage	NO

/**/#
/**/# Set MORECCFLAGS to any options you want to pass to the compiler.  These
/**/# include and defines, and debugging and/or optimization flags, and the like.
/**/# Also, if you have headers for things like the XPM library in a non-standard
/**/# place, include the appropriate -I flag here.
/**/#
/**/# There are a bunch of defines, and I can't honestly say I've used or even
/**/# tested all of them (since much of this code came from the xview 3.2 release)
/**/# and certainly I haven't used all combinations of them.  See below for
/**/# suggested settings:
/**/#
/**/# Here's a set of possible defines:
/**/#  -DALLPLANES          Support the AllPlanes extension (valid in SunOs/Solaris)
/**/#  -DDEBUG              Include some debugging code
/**/#  -DIDENT              Include ident directives for the compiler
/**/#  -DMAXPID=32768       For 386BSD
/**/#  -DMEMDEBUG           To debug the memory allocation
/**/#  -DOW_I18N_L3         Include support for Level 3 internationalization
/**/#                           (Note:  I haven't tested without this, and I can't
/**/#                            test it in any locale but C, so include it, but
/**/#                            take it with a grain of salt -- the original olwm
/**/#                            code will work, but the olvwm extensions may not
/**/#                            support the correctinternationalization)
/**/#  -DOW_I18N_L4         Include support for Level 4 internationalization
/**/#                           (Note:  This is not yet supported, but it may work)
/**/#  -DREGEXP             Support for the 386 BSD regular expression library

/**/#  -DRLIMIT_NOFILE      Support for the 386BSD/Ultrix RLIMIT calls
/**/#  -DSHAPE              Support the shapes extension (valid in SunOS/Solaris)
/**/#  -DSYSV               Support for System V (Release 3 or 4)
/**/#  -DSVR4               Support for System V Release 4 (you must also include
/**/#                               -DSYSV)
/**/#  -DXPM                Support the XPM color pixmaps -- requires that you
/**/#                               have the xpm library (version 3.0) somewhere
/**/#                               If your xpm header isn't in /usr/openwin/include 
/**/#                               make sure to add the appropriate -I flag to #                               MORECCFLAGS.  Also remember to add the 
/**/#                               library name to LDFLAGS. 
/**/#
/**/# I haven't tested this on Solaris 1.x, but I'd suggest
/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT

/**/# For a generic Solaris 2.x system, I'd suggest
/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4

/**/# Linux/ELF
MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DXPM -DXVIEW32 -DMAXPID=32768 -I/usr/include/bsd -include /usr/include/bsd/bsd.h -I$(INCROOT)/X11

/**/#
/**/# Set MORELDFLAGS to any link options you want.  Be sure to add -lxpm if you
/**/# want to include XPM support.  For a generic Solaris 1.x
/**/# system, I'd suggest
/**/#MORELDFLAGS=-L${OPENWINHOME}/lib
/**/#
/**/# For Solaris 2.x, I'd suggest
/**/#MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl
/**/#SYS_LIBRARIES = -ll -lm

/**/# Linux/ELF
MORELDFLAGS=-lbsd -lXpm
SYS_LIBRARIES = -lfl -lm

/**/# No more changes needed

#include <XView.tmpl>

/**/#########################################################################
/**/# @(#)Imakefile	1.5 10/4/91 SMI
/**/# Imakefile for olwm release 3.0.

DEFINES =  $(MORECCFLAGS)
INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR) 
DEPLIBS = 
LOCAL_LIBRARIES = $(MORELDFLAGS) $(OLGXLIB) $(XLIB)

HEADERS = cmdstream.h cursors.h debug.h defaults.h dsdm.h environ.h error.h \
          events.h gettext.h globals.h group.h helpcmd.h i18n.h iconimage.h \
          iconmask.h kbdfuncs.h list.h mem.h menu.h notice.h olcursor.h \
          olgx_impl.h ollocale.h olwm.h patchlevel.h properties.h resources.h \
          screen.h selection.h slots.h st.h virtual.h win.h

INFOFILES = olvwm.info
#if NeedOlwmManPage
MANPAGES = olwm.man olvwmrc.man
#else
MANPAGES = olvwmrc.man
#endif
BITMAPS = iconbitmap.h
SCRIPTS = 
MISC 	= openwin-menu

SRCS	= atom.c client.c cmdstream.c cursors.c debug.c defaults.c dsdm.c \
       environ.c error.c evbind.c events.c fontset.c gettext.c gif.c group.c \
       helpsend.c i18n.c images.c info.c kbdfuncs.c list.c mem.c menu.c \
       moveresize.c notice.c ol_button.413.c ol_button.svr4.c olvwmrc.c \
       olwm.c pixmap.c properties.c reduce.c resources.c screen.c \
       selection.c services.c slave.c slots.c st.c states.c usermenu.c \
       usleep.c virtual.c win.c winbusy.c winbutton.c wincolor.c winframe.c \
       wingframe.c winicon.c winipane.c winmenu.c winnofoc.c winpane.c \
       winpinmenu.c winpush.c winresize.c winroot.c

OBJS	= atom.o client.o cmdstream.o cursors.o debug.o defaults.o dsdm.o \
       environ.o error.o evbind.o events.o fontset.o gettext.o gif.o group.o \
       helpsend.o i18n.o images.o info.o kbdfuncs.o list.o mem.o menu.o \
       moveresize.o notice.o ol_button.413.o ol_button.svr4.o olvwmrc.o \
       olwm.o pixmap.o properties.o reduce.o resources.o screen.o \
       selection.o services.o slave.o slots.o st.o states.o usermenu.o \
       usleep.o virtual.o win.o winbusy.o winbutton.o wincolor.o winframe.o \
       wingframe.o winicon.o winipane.o winmenu.o winnofoc.o winpane.o \
       winpinmenu.o winpush.o winresize.o winroot.o


ALLFILES = \
	${HEADERS} ${BITMAPS} ${SRCS} \
	${MISC} ${INFOFILES} ${MANPAGES} ${SCRIPTS}

ComplexProgramTarget(olvwm)

#if NeedMenuFile
InstallNonExecList($(MISC),$(LIBRARY_DEST))
#endif

parse.c: parse.l
	lex -t parse.l > parse.c

olvwmrc.c: olvwmrc.y
	yacc olvwmrc.y
	mv y.tab.c olvwmrc.c

olvwmrc.o: parse.c olvwmrc.c

version.c: ${SRCS} ${HEADERS}
	@echo '#ident "@(#)olvwm version compiled '`date`'"' > version.c

clean::
	/bin/rm -f parse.c olvwmrc.c version.c

install.man:: $(MANPAGES)
	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	@for i in $(MANPAGES) ;\
	do \
	echo "installing $$i"; \
	$(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \
	done

#include <XView.prog>
