/***************************************************************************
 * command directory
 *
 * You can specify bin directory where FvwmCommand will reside
 * Leave it undefined if you want it to be in $(FVWMBIN)
 * FvwmCommandS will bin in $(FWVMBIN) regardless.
 * 
 ***************************************************************************/
#define COMMANDDIR $(HOME)/bin 

/***************************************************************************
 * Shell function directory
 *
 * If you use bourn shell or its cousines, define the directory
 * to install function collection file FvwmCommand.f.  Your home
 * directory or autoload directory may be a good choice.
 *
 * If you use C shell or don't want to install FvwmCommand.f
 * leave it undefined
 * 
 ***************************************************************************/
#define SHELLFUNCDIR $(FVWMDIR) 

/***************************************************************************
 * PERLLIBDIR
 *
 * If you have perl, define the perl lib (private or system) directory
 * to install function collection file FvwmCommand.pm.
 *
 * If you don't have perl or don't want to install FvwmCommand.pm
 * leave it undefined.
 *
 ***************************************************************************/
/*#define PERLLIBDIR /usr/lib/perl5 */
#define PERLLIBDIR $(HOME)/perl





BINDIR = $(FVWMDIR)
FVWM_SRCDIR = ../.. 
#include "../../Fvwm.tmpl"

DESTDIR = 

LOCAL_LIBRARIES = $(FVWM_LIBS) $(XLIB)

PROGRAMS = FvwmCommandS FvwmCommand 
#CCOPTIONS = -Wall

SRCS1 = FvwmCommand.c 
OBJS1 = FvwmCommand.o 

ComplexProgramTarget_1(FvwmCommand,$(LOCAL_LIBRARIES),)

SRCS2 = FvwmCommandS.c 
OBJS2 = FvwmCommandS.o 

NormalProgramTarget(FvwmCommandS,$(OBJS2),,$(LOCAL_LIBRARIES),)
InstallProgram(FvwmCommandS,$(FVWMDIR))

all:: 
	/bin/sh findcmd $(FVWMDIR)
	if which perl ; then perl findcmd.pl $(FVWMDIR) ; fi                   

#ifdef COMMANDDIR
install::
	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) FvwmCommand COMMANDDIR
#endif

#ifdef SHELLFUNCDIR
install::
	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) FvwmCommand.f SHELLFUNCDIR

clean::
	$(RM) FvwmCommand.f
#endif
	
#ifdef PERLLIBDIR
install:: 
	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) FvwmCommand.pm PERLLIBDIR

clean::
	$(RM) FvwmCommand.pm
#endif
	


