From e1ee35ad724a62d7e4d1d7a4499f81759a36f9c4 Mon Sep 17 00:00:00 2001 From: toni Date: Tue, 4 Nov 2014 08:49:25 +0100 Subject: - shellcode testing unit - hello_world asm example --- shellcode/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shellcode/Makefile') diff --git a/shellcode/Makefile b/shellcode/Makefile index e2b4b69..e7833cd 100644 --- a/shellcode/Makefile +++ b/shellcode/Makefile @@ -1,4 +1,5 @@ RM := rm +ASM := nasm CC := gcc LD := ld OBJCOPY := objcopy @@ -6,7 +7,7 @@ XXD := xxd CFLAGS = -c -Wall -fpic -Os LDFLAGS = SUBDIR ?= . -TARGETS = $(patsubst %.c,%.o,$(wildcard $(SUBDIR)/*.c)) +TARGETS = $(patsubst %.c,%.o,$(wildcard $(SUBDIR)/*.c)) $(patsubst %.asm,%.o,$(wildcard $(SUBDIR)/*.asm)) all: $(TARGETS) @@ -16,6 +17,9 @@ all: $(TARGETS) $(OBJCOPY) -R .note -R .comment -S -O binary $(patsubst %.o,%,$@) $(patsubst %.o,%.bin,$@) $(XXD) -i $(patsubst %.o,%.bin,$@) +%.o : %.asm + $(ASM) -o $@ $< + clean: $(RM) -f $(patsubst %.o,%.map,$(TARGETS)) $(patsubst %.o,%.bin,$(TARGETS)) $(patsubst %.o,%,$(TARGETS)) $(TARGETS) -- cgit v1.2.3