# drivers/message/fusion/utils/makefile

ifndef $(TOPDIR)
	TOPDIR = ../../../..
endif
ifndef $(HOSTCC)
	CC = gcc
endif

BIG_CONFIG_HELP = $(TOPDIR)/Documentation/Configure.help

CFLAGS = -g -O -Wall -I. -I.. -I$(TOPDIR)/include

default all: check_fusion_help mptflash what mptfdu

check_fusion_help: $(TOPDIR)/Documentation/Configure.help FRC
	@ if ! grep '^Fusion MPT device support$$' $< >/dev/null 2>&1; then\
		cat Config.help >> $<;\
		echo "$@: Appended Fusion MPT help sections to ${<F}";\
	else\
		echo "$@: Check of ${<F} for Fusion MPT help sections: OK";\
	fi

$(TOPDIR)/Documentation/Configure.help: Config.help FRC


clean:
	rm -f *.o mptflash what mptfdu

FRC:

# Dependencies...
mptflash.o: mptflash.c ../mptbase.h makefile
what.o: what.c makefile
mptfdu.o: mptfdu.c makefile\
  ../mptbase.h ../linux_compat.h ../scsi3.h \
  ../lsi/mpi_type.h ../lsi/mpi.h ../lsi/mpi_ioc.h \
  ../lsi/mpi_cnfg.h ../lsi/mpi_init.h ../lsi/mpi_lan.h \
  ../lsi/mpi_raid.h ../lsi/mpi_fc.h ../lsi/mpi_targ.h \
  ../lsi/fc_log.h ../mptctl.h


