diff options
author | toni <matzeton@googlemail.com> | 2014-11-04 08:49:25 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2014-11-04 08:49:25 +0100 |
commit | e1ee35ad724a62d7e4d1d7a4499f81759a36f9c4 (patch) | |
tree | 6d9f2af29be871c15c9225d11faba12f28171232 /shellcode/Makefile | |
parent | a76cb7ea291fb1ee5c74fd9bc76ab71630fa625a (diff) |
- shellcode testing unit
- hello_world asm example
Diffstat (limited to 'shellcode/Makefile')
-rw-r--r-- | shellcode/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
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) |