aboutsummaryrefslogtreecommitdiff
path: root/shellcode/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'shellcode/Makefile')
-rw-r--r--shellcode/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/shellcode/Makefile b/shellcode/Makefile
index c35111d..e2b4b69 100644
--- a/shellcode/Makefile
+++ b/shellcode/Makefile
@@ -2,6 +2,7 @@ RM := rm
CC := gcc
LD := ld
OBJCOPY := objcopy
+XXD := xxd
CFLAGS = -c -Wall -fpic -Os
LDFLAGS =
SUBDIR ?= .
@@ -13,6 +14,7 @@ all: $(TARGETS)
$(CC) $(CFLAGS) -o $@ $<
$(LD) $(LDFLAGS) -N -Ttext 0x0 -e _start -Map $(patsubst %.o,%.map,$@) $@ -o $(patsubst %.o,%,$@)
$(OBJCOPY) -R .note -R .comment -S -O binary $(patsubst %.o,%,$@) $(patsubst %.o,%.bin,$@)
+ $(XXD) -i $(patsubst %.o,%.bin,$@)
clean:
$(RM) -f $(patsubst %.o,%.map,$(TARGETS)) $(patsubst %.o,%.bin,$(TARGETS)) $(patsubst %.o,%,$(TARGETS)) $(TARGETS)