obj-$(BUILD_kdbus) += kdbus/
all:
- make -C $(KERNELDIR) M=$(PWD) modules
+ make -C $(KERNELDIR) M=$(PWD) CFLAGS_MODULE=-I$(PWD)/include modules
modules_install:
make -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_STRIP=$(INSTALL_MOD_STRIP) INSTALL_MOD_PATH=$(PWD)/../$(INSTALL_MOD_PATH) modules_install
#include <linux/ioctl.h>
#include <linux/stddef.h>
-#include "kdbus.h"
+#include <uapi/linux/kdbus.h>
/* all exported addresses are 64 bit */
#define KDBUS_PTR(addr) ((void __user *)(uintptr_t)(addr))
#include <linux/fdtable.h>
#include <linux/file.h>
-#include "logger.h"
+#include <uapi/linux/logger.h>
/**
* struct logger_log - represents a specific log, such as 'main' or 'radio'
mkdir -p %{buildroot}/usr/src/%{name}/kdbus
mkdir -p %{buildroot}/%{_includedir}/linux
+cp -a include/ %{buildroot}/usr/src/%{name}
cp kernel/*.[ch] kernel/Makefile COPYING %{buildroot}/usr/src/%{name}
cp kernel/kdbus/*.[ch] kernel/kdbus/Makefile %{buildroot}/usr/src/%{name}/kdbus
-# TODO: Consider adding logger.h
-cp kernel/kdbus/kdbus.h %{buildroot}/%{_includedir}/linux
+cp include/uapi/linux/kdbus.h %{buildroot}/%{_includedir}/linux
+cp include/uapi/linux/logger.h %{buildroot}/%{_includedir}/linux
%files
%manifest %{name}.manifest
%license COPYING
/usr/src/%{name}/COPYING
/usr/src/%{name}/*.c
-/usr/src/%{name}/*.h
/usr/src/%{name}/Makefile
/usr/src/%{name}/kdbus/*.c
/usr/src/%{name}/kdbus/*.h
/usr/src/%{name}/kdbus/Makefile
+/usr/src/%{name}/include/uapi/linux/*.h
%files headers
%manifest %{name}.manifest
%license COPYING
%{_includedir}/linux/kdbus.h
+%{_includedir}/linux/logger.h