# vi: ts=8 sw=8
#
# MTS TI USB 3410/5052 Makefile
#
# Copyright (C) 2008 Multi-Tech Systems based on 2004 Texas Instruments
#
# 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 of the License, or
# (at your option) any later version.
#
# For questions or problems with this driver, contact Multi-Tech Systems
# technical support. 
# 
# $Id: Makefile,v 1.3.0 2008-10-24 15:39:19 drg Exp $
#

.PHONY: modules install uninstall clean clobber ti_usb_devices \
	release configure rcsdiff ci rcs-n

modules:
	$(MAKE) -C src modules

install:
	$(MAKE) -C src install
	install -m 0755 -d /etc/ti_usb
	install -m 0644 mts_ti_usb_2.6_release_notes-*.txt /etc/ti_usb

install_rpm:
	$(MAKE) -C src install_rpm
	install -m 0755 -d $(TI_USB_BUILDROOT)/etc/ti_usb
	install -m 0644 mts_ti_usb_2.6_release_notes-*.txt $(TI_USB_BUILDROOT)/etc/ti_usb

uninstall:
	$(MAKE) -C src uninstall
	rm -rf /etc/ti_usb

clean:
	-$(MAKE) -C release clean
	-$(MAKE) -C src clean

clobber: clean
	rm -rf configure *.cache *.log *.status
	-$(MAKE) -C release clobber
	-$(MAKE) -C src clobber

release:
	$(MAKE) -C release

configure:
	$(MAKE) -C release ../configure

rcsdiff:
	( rcsdiff RCS/*; true )
	( cd src; rcsdiff RCS/*; true )
	( cd release; rcsdiff RCS/*; true )
	( cd docs; rcsdiff RCS/*; true )

ci:
	( ci -l RCS/* )
	( cd src; ci -l RCS/* )
	( cd release; ci -l Makefile mts_ti_usb-2.6-1.3.0.spec )
	( cd docs; ci -l RCS/* )

rcs-n:
ifdef NAME
	( rcs -n$(NAME): RCS/* )
	( cd src; rcs -n$(NAME): RCS/* )
	( cd release; rcs -n$(NAME): RCS/* )
	( cd docs; rcs -n$(NAME): RCS/* )
else
	@echo No NAME given.
endif
