# 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 runned 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. # - VMLINUZ: path to vmlinuz # # e.g.: # make KERNEL=/lib/modules/4.8.0-58-generic/build \ # TARGET=nyan-exploit \ # VMLINUZ=/boot/vmlinuz-4.8.0-58-generic TARGET := CVE-2016-5195 all: gcc CVE-2016-5195.c -o $(TARGET) gcc CVE-2016-5195_test.c -o $(TARGET)_test clean: rm -f $(TARGET) $(TARGET)_test