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

/**/# If you need the default menu file (you haven`t installed OPENWINDOWS or
/**/# you haven`t installed olwm) set NeedMenuFile to YES
#define NeedMenuFile	NO

/**/# 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

/**/# If you don`t want the compile date included in the executable, comment
/**/# out these lines
#ifndef RsArchitecture
VERSION = version.o
#endif

/**/# If you`re compiling on Solaris 2.x (or any SVR4 system, I would think)
/**/# uncomment the following line (also comment out the version line above)
/**/#SVR=-DSVR4 -DSYSV
/**/# If you`re compiling under SVR3 (e.g. SunOS 4.1.x with the System V
/**/# libraries) uncomment out the following line
SVR=-DSYSV

/**/# If you have XPM and want to include support for XPM bitmaps as menu
/**/# images, uncomment out the following lines and change the definitions
/**/# for xpm.h and libXpm.a accordingly.  Otherwise, leave these lines
/**/# as comments
/**/#XPM=-DXPM
/**/#XPMINCDIR=-I$(INCROOT)/X11
/**/#XPMLIB=-L$(USRLIBDIR) -lXpm

/**/# If your compiler does not support the ident directive (or if you don`t
/**/# want the sccs strings included in the resulting executable), comment
/**/# out the following line
#IDENT=-DIDENT

/**/# No more changes needed

#inc(lude) <XView.tmpl>

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

#ifdef RsArchitecture
DEFINES = -DSHAPE -DAIXV3 -DSYSV $(XPM) $(IDENT)
SYS_LIBRARIES = -ll -lm
#else
#DEFINES =  -DOW_I18N_L3 -DSUNDAE -DSHAPE $(SVR) $(XPM) $(IDENT)
DEFINES =  -DSHAPE $(SVR) $(XPM) $(IDENT)
SYS_LIBRARIES = -ll -lm -lmisc
#endif
INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR) 
DEPLIBS = 
OLGXLIB=-lolgx
LOCAL_LIBRARIES = $(OLGXLIB) $(XLIB) $(XPMLIB)

HEADERS = cmdstream.h cursors.h defaults.h environ.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 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	= Debug.c Error.c Notice.c Select.c WinInfo.c atom.c client.c   \
	  cmdstream.c cursors.c defaults.c environ.c evbind.c           \
	  events.c gettext.c group.c helpsend.c images.c 		\
	  kbdfuncs.c list.c mem.c menu.c moveresize.c ol_button.c olwm.c\
	  olvwmrc.c properties.c resources.c screen.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 = 	\
	  Debug.o Error.o Notice.o Select.o WinInfo.o atom.o client.o    \
          cmdstream.o cursors.o defaults.o environ.o evbind.o            \
          events.o gettext.o group.o helpsend.o i18n.o images.o		 \
	  kbdfuncs.o list.o mem.o menu.o moveresize.o ol_button.o olwm.o \
	  olvwmrc.o properties.o resources.o screen.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 ${VERSION}


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

#inc(lude) <XView.prog>
