Fixed -I for prevention of -I/usr/include during Linux kernel mod compilation.
[lufs.git] / kernel / Linux / modbin / Makefile.am
1 all-local: *.o
2
3 *.o:
4         $(srcdir)/../prepmod --modbindir=. --basedir=$(srcdir)/.. \
5                         --kernel-gcc-args="-I$(top_srcdir)/include/lufs" \
6                         --prebuild \
7                         $(wildcard /usr/src/kernel-headers-*) \
8                         $(wildcard $(top_srcdir)/../kernel-source-*.rpm)
9
10 # FIXME: We need double make invocation to properly build files and resolve the wildcard during 'install'!
11 # Keep the basename as 'lufs.o'.
12 # Do not use '$(INSTALL_PROGRAM)' as it would strip the modules.
13 install-exec-hook: $(wildcard lufs-*.o)
14         for i in $^;do \
15                 destdir="$(DESTDIR)$(datadir)/lufs/modbin/`basename $$i .o`"; \
16                 $(mkinstalldirs) $$destdir; \
17                 $(INSTALL_DATA) $$i $$destdir/lufs.o; \
18                 done
19
20 CLEANFILES=$(wildcard lufs-*.o)