-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (31 loc) · 1.24 KB
/
Makefile
File metadata and controls
44 lines (31 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#PLATFORM=TCG300
PLATFORM=CG3700
TCPREFIX=gnutools/mipsisa32-elf/bin/mipsisa32-elf-
CC=$(TCPREFIX)gcc
OBJCOPY=$(TCPREFIX)objcopy
LDSCRIPT=$(PLATFORM)/payload.ld
CFLAGS=-march=mips32 -mabi=eabi -msoft-float -mno-abicalls -fno-builtin -nostdlib -nodefaultlibs -nostartfiles -T $(LDSCRIPT)
default: sample.bin reverseshell.bin reverseshell_thread.bin bindshell.bin bindshell_thread.bin
sample.elf: sample.c
$(CC) sample.c -o $@ $(CFLAGS)
sample.bin: sample.elf
$(OBJCOPY) -O binary -j .start -j .text -j .data -j .rodata $< $@
reverseshell.elf:
$(CC) reverseshell.c -o $@ $(CFLAGS)
reverseshell.bin: reverseshell.elf
$(OBJCOPY) -O binary -j .start -j .text -j .data -j .rodata $< $@
reverseshell_thread.elf:
$(CC) reverseshell_thread.c -o $@ $(CFLAGS)
reverseshell_thread.bin: reverseshell_thread.elf
$(OBJCOPY) -O binary -j .start -j .text -j .data -j .rodata $< $@
bindshell.elf: bindshell.c
$(CC) bindshell.c -o $@ $(CFLAGS)
bindshell.bin: bindshell.elf
$(OBJCOPY) -O binary -j .start -j .text -j .data -j .rodata $< $@
bindshell_thread.elf: bindshell_thread.c
$(CC) bindshell_thread.c -o $@ $(CFLAGS)
bindshell_thread.bin: bindshell_thread.elf
$(OBJCOPY) -O binary -j .start -j .text -j .data -j .rodata $< $@
.PHONY: clean
clean:
rm -f *.elf *.bin