17 lines
352 B
Makefile
17 lines
352 B
Makefile
|
SOURCES = $(wildcard *.asm)
|
||
|
OBJS = $(SOURCES:.asm=.o)
|
||
|
EXECS = $(patsubst %.asm,%.runme,$(SOURCES))
|
||
|
all: $(EXECS) bufoverflow
|
||
|
|
||
|
%.o: %.asm
|
||
|
nasm -g -f elf64 $<
|
||
|
|
||
|
%.runme: %.o
|
||
|
ld -o $@ $<
|
||
|
|
||
|
clean:
|
||
|
rm -f *.o *.runme bufoverflow
|
||
|
|
||
|
bufoverflow:
|
||
|
gcc bufoverflow.c -g -z execstack -o bufoverflow -O1 -fno-unroll-loops -fno-omit-frame-pointer -fno-dce -fno-dse
|