##########################################################################
 #  Copyright 2004 by Floyd L. Davidson
 #
 #  This program is free software; you can redistribute it
 #  and/or modify it under the terms of the GNU General Public
 #  License as published by the Free Software Foundation;
 #  either version 2, or (at your option) any later version.
 #
 #  This program is distributed in the hope that it will be
 #  useful, but WITHOUT ANY WARRANTY; without even the implied
 #  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 #  PURPOSE.  See the GNU General Public License for details.
 #
 #
 #  Makefile        --  Makefile for the w83627hf initialization program
 #
 #  $Id: Makefile,v 1.1.0.5 2004/10/20 13:45:08 floyd Exp floyd $
 #
##########################################################################
 #
 #  Copyright 2004 by Floyd Davidson, floyd@barrow.com
 #  File created:  Sun Sep  2 04:53:43 2004
 #  Last updated:  Fri Sep 10 05:40:00 2004
 #
##########################################################################

SHELL = /bin/sh
.SUFFIXES:
.SUFFIXES: .c .o

#
# Turn on just about everything reasonably possible
#
GCC_WFLAGS = -Wcast-align -Wcast-qual  -Wmissing-prototypes  \
	     -Wshadow -Wnested-externs -Wstrict-prototypes \
	     -Waggregate-return  -Wtraditional

#
# optimizations that could be included for production versions.
#
GCC_FFLAGS = -finline-functions -fomit-frame-pointer -fstrength-reduce

#
# Comment out as needed...
#
GCC_OPTIM  = -O2
GCC_SYMTAB = -g
GCC_ANSI   = -ansi
GCC_PEDANT = -pedantic

#
GCC_DEBUG  = ${GCC_SYMTAB} ${GCC_OPTIM} ${GCC_ANSI} ${GCC_PEDANT} -Wall -W
CC = gcc
LD = ${CC}

LIBS =
OPTS = ${GCC_DEBUG} ${GCC_WFLAGS} ${GCC_FFLAGS}

HDRS    =
MAN     = w83627hf.1
SRCS    = w83627hf.c

S       = $(SRCS) $(HDRS) $(MAN) Makefile
OBJS    = $(SRCS:.c=.o)

TARGETS = w83627hf

all: $(TARGETS)

#
w83627hf: ${OBJS}
	${LD} ${OBJS} $(LIBS) $(LDOPTS) -o $@

clean:
	rm -f *.o *[~%] *core

cleanall: clean
	rm -f ${MISC}
	rm -rf Msgs

.c.o:
	$(CC) $(OPTS) -c $<

man:    $(TARGETS).$(MANSECT).gz

$(TARGETS).$(MANSECT).gz:      $(TARGETS).$(MANSECT)
	        groff -Tascii -mandoc $(TARGETS).$(MANSECT) | col -xb > $(TARGETS).man
	        gzip -c $(TARGETS).$(MANSECT) > $(TARGETS).$(MANSECT).gz