1
0
Fork 0
out-of-tree/examples/kernel-exploit/Makefile

22 lines
664 B
Makefile

# out-of-tree called make with four arguments:
# - KERNEL: kernel headers path
# - TARGET: name of exploit binary that MUST be produced by makefile.
# - $(TARGET)_test: name of test binary that MUST be produced by makefile
# and it's will be executed on a LPE stage. TARGET_TEST MUST accept two argument:
# - Path to exploit binary
# - File that MUST be created with exploit. It uses for test that exploit works
# correctly.
#
# e.g.:
# make KERNEL=/lib/modules/4.8.0-58-generic/build \
# TARGET=nyan-exploit \
TARGET := CVE-2017-16995
all:
gcc CVE-2017-16995.c -o $(TARGET)
cp test.sh $(TARGET)_test
clean:
rm -f $(TARGET) $(TARGET)_test