#
# ident "@(#)Makefile	1.7 04/11/01 SMI"
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

VERSION = $(shell uname -r)
INSTALLDIR = /lib/modules/$(VERSION)/misc
KERNELDIR = /lib/modules/$(VERSION)/build

C_FILES = utadem.c
H_FILES = utadem.h

COBJ = $(C_FILES:%.c=%.o)

DEFS = -D__KERNEL__ -DMODULE -DMODVERSIONS

INCS = -include $(KERNELDIR)/include/linux/modversions.h
INCS += -I$(KERNELDIR)/include -I.

CFLAGS = -Wstrict-prototypes -O -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 

all: $(COBJ)

%.o: %.c
	gcc $(DEFS) $(INCS) $(CFLAGS) -c -o $@ $<

install:
	install -d $(INSTALLDIR)
	install -c $(COBJ) $(INSTALLDIR)

uninstall:
	rm -f $(INSTALLDIR)/$(COBJ)

clean:
	rm -f $(COBJ)
