# -*- Mode: Makefile -*-
#
# wh - show full paths of potential commands
#
# This file was placed in the Public Domain by its author on 14
# March 1999.  Those who modify this file are encouraged to send
# mail to Rick Campbell <rick@campbellcentral.org> with their Public 
# Domain modifications so that they can be included in future
# versions.
#

#
# If you uncomment the ANSI_* definitions below, wh will use malloc/free
# rather than alloca/nothing for less efficient, but ANSI compliant memory
# management.
#

#ANSI_CFLAGS=-ansi
#ANSI_CPPFLAGS=-DWH_ANSI
CFLAGS=-g -Wall $(ANSI_CFLAGS) -pedantic -pedantic-errors
CPPFLAGS=$(ANSI_CPPFLAGS)
PROGRAM_NAME=wh
PROGRAM_DIRECTORY=.
PROGRAM=$(PROGRAM_DIRECTORY)/$(PROGRAM_NAME)
SOURCES=wh.c
OBJECTS=$(SOURCES:%.c=%.o)

$(PROGRAM):	$(OBJECTS)
	$(CC) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS)

test:	$(PROGRAM)
	$(PROGRAM) -l -F wh

clean:
	$(RM) $(PROGRAM) $(OBJECTS) *~ \#*
