include $(ROOT)/usr/include/make/commondefs

default install clean clobber runtests:

#
# List of headers to fetch: rsync.hdrs
# Fetch headers from [download path]/usr/include
#
# List of libraries to fetch: rsync.libs
# Fetch libraries from [download path]/usr/lib/rvl
#
# List of binaries to fetch: rsync.bins
# Fetch binaries from [download path]/usr/bin/rvl
#
# List of other stuff to fetch: rsync.misc
# Fetch from [download path]/usr
#
# Note: No spaces after file names in the rsync list file!
#

#
# Specify the source for the imported files.  The default
# is to use the results of the NC cygwin build on filestore.
#
CYGBUILD=scbuild@filestore.routefree.com::build/NC_cygwin/latest

headers:
	chmod 440 rsync.pw
	-rm -rf ./usr/include
	mkdir -p ./usr/include
	rsync -avz --password-file=rsync.pw $(CYGBUILD)/usr/include/ ./usr/include
	cat rsync.hdrs | (cd ./usr/include; tar cf - -T -) | (cd $(ROOT)/usr/include; tar xvf -)
	-rm -rf ./usr

exports:
	chmod 440 rsync.pw
	-rm -rf ./usr/lib
	mkdir -p ./usr/lib
	rsync -avz --password-file=rsync.pw $(CYGBUILD)/usr/lib/ ./usr/lib
	cat rsync.libs | (cd ./usr/lib; tar cf - -T -) | (cd $(ROOT)/usr/lib; tar xvf -)
	-rm -rf ./usr
