## Process this file with automake to produce Makefile.in
##
## $Id: Makefile.am,v 1.2 2007/05/29 19:06:09 adeniz Exp $
##
## automake input for the MicroNeil SNF4CGP distribution (top directory).
##
## Author:  Alban Deniz
##
## Copyright (C) 2009 ARM Research Labs, LLC.
## See www.armresearch.com for the copyright terms.
##

SUBDIRS = 			\
	binary/SNF4CGP          \
	binary/SNF2Check	\
	binary/SNFClient	\
	Scripts			\
	config_files		\
	Doc

noinst_HEADERS =                    			          \
	@top_srcdir@/source/SNF4CGP/Command.hpp		          \
	@top_srcdir@/source/SNF4CGP/ConfigurationEngine.hpp	  \
	@top_srcdir@/source/SNF4CGP/ExecutiveProcess.hpp	  \
	@top_srcdir@/source/SNF4CGP/InputProcessor.hpp		  \
	@top_srcdir@/source/SNF4CGP/JobPool.hpp		          \
	@top_srcdir@/source/SNF4CGP/OutputProcessor.hpp	          \
	@top_srcdir@/source/SNF4CGP/ScannerPool.hpp		  \
	@top_srcdir@/source/SNF4CGP/WorkerPool.hpp                \
	@top_srcdir@/source/CodeDweller/base64codec.hpp		  \
	@top_srcdir@/source/CodeDweller/configuration.hpp	  \
	@top_srcdir@/source/CodeDweller/configuration.inline.hpp  \
	@top_srcdir@/source/CodeDweller/histogram.hpp		  \
	@top_srcdir@/source/CodeDweller/networking.hpp		  \
	@top_srcdir@/source/CodeDweller/networking.inline.hpp	  \
	@top_srcdir@/source/CodeDweller/threading.hpp		  \
	@top_srcdir@/source/CodeDweller/faults.hpp		  \
	@top_srcdir@/source/CodeDweller/mangler.hpp		  \
	@top_srcdir@/source/CodeDweller/timing.hpp                \
	@top_srcdir@/source/SNFMulti/snf_saccades.hpp	          \
	@top_srcdir@/source/SNFMulti/FilterChain.hpp		  \
	@top_srcdir@/source/SNFMulti/GBUdb.hpp			  \
	@top_srcdir@/source/SNFMulti/GBUdb.inline.hpp		  \
	@top_srcdir@/source/SNFMulti/scanner.hpp		  \
	@top_srcdir@/source/SNFMulti/snfCFGmgr.hpp		  \
	@top_srcdir@/source/SNFMulti/snfCFGmgr.inline.hpp	  \
	@top_srcdir@/source/SNFMulti/snf_engine.hpp		  \
	@top_srcdir@/source/SNFMulti/snfGBUdbmgr.hpp		  \
	@top_srcdir@/source/SNFMulti/snf_HeaderFinder.hpp	  \
	@top_srcdir@/source/SNFMulti/snf_HeaderFinder.inline.hpp  \
	@top_srcdir@/source/SNFMulti/snfLOGmgr.hpp		  \
	@top_srcdir@/source/SNFMulti/snfLOGmgr.inline.hpp	  \
	@top_srcdir@/source/SNFMulti/SNFMulti.hpp		  \
	@top_srcdir@/source/SNFMulti/snfNETmgr.hpp		  \
	@top_srcdir@/source/SNFMulti/snf_sync.hpp		  \
	@top_srcdir@/source/SNFMulti/snf_xci.hpp		  \
	@top_srcdir@/source/SNFMulti/snfXCImgr.hpp		  \
	@top_srcdir@/source/SNFMulti/snf_match.h

doc_DATA =			\
	BUGS			\
	ChangeLog  		\
	README 			\
	TODO			\
	INSTALL			\
	COPYING

EXTRA_DIST = 				\
	$(doc_DATA)			\
	Makefile.am			\
	configure.ac

TEMP_DIR=CGPSNF-TEMP
MOD_DIR=CGPSNF
MOD_PATH=$(TEMP_DIR)/$(MOD_DIR)
MOD_TARBALL=CGPSNF-MODULE.tar.gz
module:
	rm -rf $(TEMP_DIR)
	mkdir $(TEMP_DIR)
	mkdir $(MOD_PATH)
	chmod 2770 $(MOD_PATH)
	mkdir $(MOD_PATH)/hold $(MOD_PATH)/Doc
	cp binary/SNF4CGP/SNF4CGP $(MOD_PATH)/CGPSNF
	cp binary/SNFClient/SNFClient $(MOD_PATH)
	cp binary/SNF2Check/SNF2Check $(MOD_PATH)
	cp Scripts/getRulebase.sample $(MOD_PATH)
	cp Scripts/junkmsg.txt $(MOD_PATH)
	cp Scripts/cleanmsg.txt $(MOD_PATH)
	cp config_files/GBUdbIgnoreList.txt.sample $(MOD_PATH)
	cp config_files/snf_engine.xml.sample $(MOD_PATH)
	cp config_files/identity.xml.sample $(MOD_PATH)
	cp Doc/README $(MOD_PATH)
	cp Doc/AdminStyle.css $(MOD_PATH)/Doc
	cp Doc/GuideStyle.css $(MOD_PATH)/Doc
	cp Doc/default.html $(MOD_PATH)/Doc
	cp Doc/DownLoad.gif $(MOD_PATH)/Doc
	cp Doc/DisabledDownLoad.gif $(MOD_PATH)/Doc
	chown -R root:mail $(MOD_PATH)
	(cd $(TEMP_DIR); tar czvf ../$(MOD_TARBALL) ./$(MOD_DIR))
	rm -rf $(TEMP_DIR)
	@echo "Created the CommuniGate Pro module in $(MOD_TARBALL)"
