# $ZEL: Makefile,v 1.10 2010/01/21 21:47:44 wuestner Exp $ # # We're just setting the stage here and # let the Kernel Makefile do the real work. # KERNVER := $(shell uname -r) MODULENAME := sis1100 .PHONY: driver all:driver #%.c: @srcdir@/%.c # ln -sf $< $@ #%.h: @srcdir@/%.h # ln -sf $< $@ driver: $(patsubst @srcdir@/%, ./% , $(wildcard @srcdir@/*.c @srcdir@/*.h)) echo not compiling driver # $(MAKE) -C /lib/modules/$(KERNVER)/build SUBDIRS=$(shell pwd) modules # make -C /lib/modules/$(KERNVER)/build SUBDIRS=$(shell cd @srcdir@;pwd) modules install: # -/sbin/rmmod $(MODULENAME) echo not installing into $(DESTDIR) # $(MAKE) INSTALL_MOD_PATH=$(DESTDIR) -C /lib/modules/$(KERNVER)/build SUBDIRS=$(shell pwd) modules_install # /sbin/depmod -a # /sbin/modprobe $(MODULENAME) # cp -f @top_srcdir@/udev-rules/92-struck.rules $(DESTDIR)/etc/udev/rules.d/92-struck.rules clean: -rm -f *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c Module.symvers modules.order -rm -f Module.markers -rm -r -f .tmp_versions distdir: cp Makefile.in *.c *.h $(distdir) # empty targets for compatibility with automake-Makefiles dvi: pdf: ps: info: html: check: installcheck: ifndef src src:=$(shell pwd) endif SOURCES:=$(notdir $(wildcard $(src)/*.c)) sis1100-objs := $(patsubst %.c, %.o, $(filter-out %netbsd.c, $(SOURCES))) ifneq ($(KERNELRELEASE), ) EXTRA_CFLAGS += -DMODULENAME=$(MODULENAME) obj-m += sis1100.o else modules: sis1100.o sis1100.o: $(sis1100-objs) $(LD) -r -o $@ $^ endif