freebsd-ports/sysutils/osquery/files/patch-kernel_linux_Makefile
Ryan Steinmetz 6efaeef862 New port: sysutils/osquery:
osquery exposes an operating system as a high-performance relational database.
This allows you to write SQL-based queries to explore operating system data.
With osquery, SQL tables represent abstract concepts such as running
processes, loaded kernel modules, open network connections, browser plugins,
hardware events or file hashes.

WWW: https://osquery.io/

Sponsored by:	Beer from wxs@
2015-05-10 15:19:11 +00:00

50 lines
1.4 KiB
Text

--- kernel/linux/Makefile.orig 2015-05-05 00:16:41 UTC
+++ kernel/linux/Makefile
@@ -1,47 +0,0 @@
-obj-m += camb.o
-camb-objs += main.o sysfs.o hash.o
-
-# We need headers to build against a specific kernel version
-ifndef KDIR
- KDIR = /lib/modules/$(shell uname -r)/build
-# @echo "Using default kernel directory: ${KDIR}"
-endif
-
-# If user specifies a System.map, get addresses from there
-ifdef SMAP
- OPTS += -DTEXT_SEGMENT_START="0x$(shell grep '\s\+T\s\+_stext\b' ${SMAP} | cut -f1 -d' ')"
- OPTS += -DTEXT_SEGMENT_END="0x$(shell grep '\s\+T\s\+_etext\b' ${SMAP} | cut -f1 -d' ')"
- OPTS += -DSYSCALL_BASE_ADDR="0x$(shell grep '\s\+R\s\+sys_call_table\b' ${SMAP} | cut -f1 -d' ')"
-
-# Otherwise, they must be present on the build line
-else
- OPTS += -DTEXT_SEGMENT_START="${TEXT_SEGMENT_START}"
- OPTS += -DTEXT_SEGMENT_END="${TEXT_SEGMENT_END}"
- OPTS += -DSYSCALL_BASE_ADDR="${SYSCALL_BASE_ADDR}"
-endif
-
-ifdef HIDE_ME
- OPTS += -DHIDE_ME
- camb-objs += hide.o
-endif
-
-all:
-
-ifndef SMAP
- ifndef TEXT_SEGMENT_START
- @echo "Missing parameter: TEXT_SEGMENT_START"
- @exit 1
- endif
-
- ifndef TEXT_SEGMENT_END
- @echo "Missing parameter: TEXT_SEGMENT_END"
- @exit 1
- endif
-
- ifndef SYSCALL_BASE_ADDR
- @echo "Missing parameter: SYSCALL_BASE_ADDR"
- @exit 1
- endif
-endif
-
- $(MAKE) -C $(KDIR) M=$(shell pwd) EXTRA_CFLAGS="${OPTS}" modules