1 # Directories building kernel modules should have two files:
5 # MODULES := <module-name>
6 # <module-name>-objs := file1.o file2.o file3.o
12 # modulefs_DATA = <module-name>$(KMODEXT)
15 # DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources>
16 # MOSTLYCLEANFILES = *.o *.ko *.mod.c
23 @if test -d $(DESTDIR)$(kextdir) ; then \
24 echo chown -R root:wheel $(DESTDIR)$(kextdir) ; \
25 chown -R root:wheel $(DESTDIR)$(kextdir) || \
26 echo >&2 "*** WARNING: Could not fix kext ownership for $(DESTDIR)$(kextdir)" ; \
31 include @LINUX_CONFIG@
33 EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS)
34 EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @CFLAGS@
35 EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS)
37 KBUILD_EXTRA_SYMBOLS += @EXTRA_SYMBOLS@
39 obj-m += $(patsubst %,%.o,$(MODULES))