#~~syntax:makefile
#==============================================================================
# ttyrpld - TTY replay daemon
#   Copyright © Jan Engelhardt <jengelh [at] linux01 gwdg de>, 2004 - 2005
#   -- License restrictions apply (GPL2)
#
#   This file is part of ttyrpld.
#   ttyrpld 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; however only version 2 of the License.
#
#   ttyrpld 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 more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program kit; if not, write to:
#   Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#   02111-1307, USA.
#
#   -- For details see doc/GPL2.txt.
#==============================================================================
MODULES_DIR := /lib/modules/$(shell uname -r)
KERNEL_DIR  := ${MODULES_DIR}/build

.PHONY: all modules install clean

all: modules

modules: ;
	make -C ${KERNEL_DIR} SUBDIRS=$$PWD modules;

rpldev.ko: all;

install: rpldev.ko;
	mkdir -p ${MODULES_DIR}/misc;
	cp $< ${MODULES_DIR}/misc/;

clean: ;
	make -C ${KERNEL_DIR} SUBDIRS=$$PWD clean;

obj-m += rpldev.o
EXTRA_CFLAGS += -funit-at-a-time  

#==[ End of file ]=============================================================
