#
# Simple makefile to compile and install a program.
#
# To use this makefile you must first fill in the configuration information
# below.
#
# To compile and link type:
# make
#
# To install type:
# make install
#
# To uninstall (remove) type:
# make uninstall
#
# To clean up after the build type:
# make clean
#
# Use "make clean" followed by "make" and then "make install" to force
# a complete recompilation.
#
# To copy a new Makefile into your current directory type:
# "newmake".
#

# START OF CONFIGURATION AREA

# Change the following to the name of your program.
# If your program source is called prog.c it would be:
# PROGNAME=prog


PROGNAME=memtst

# cc flags (options which will be used by the c compiler)

#CFLAGS= -O -Wall
CFLAGS= -O

# C compiler to use.
# SUN cc by default, for gcc (GNU C) uncomment the next line
#CC=gcc

# linker flags (options to be used by the linker)

LDFLAGS=

# Where to install the binary
BINDIR = /usr/local/bin

# END OF CONFIGURATION AREA

$(PROGNAME): $(PROGNAME).o
	$(CC) $(PROGNAME).o -o $(PROGNAME) $(LDFLAGS)

install:
	install $(PROGNAME) $(BINDIR)
	@echo
	@echo "      If this is the first time that you have built this program"
	@echo "      you must now type \"rehash\"."
	@echo

uninstall:
	rm -f $(BINDIR)/$(PROGNAME)

clean:
	rm -f $(PROGNAME).o $(PROGNAME)

