forked from osirislab/Shellcode
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
35 lines (26 loc) · 714 Bytes
/
Copy pathmakefile
File metadata and controls
35 lines (26 loc) · 714 Bytes
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
CFLAGS=-m32 -g -masm=intel
SLFLAGS=-Wl,-Bstatic -static-libgcc -static
all: assemble compile link
link:
gcc *.o -o lib $(CFLAGS)
assemble:
nasm -f elf gs.s
compile:
gcc -c lib.c $(CFLAGS)
clean:
rm -f gs.o
rm -f lib.o
rm -f lib
clear;clear
shared: assemble
gcc -c lib.c $(CFLAGS) --shared -fPIC -D LIB
gcc *.o -o lib $(CFLAGS) --shared -fPIC -D LIB
pie: assemble
gcc -c lib.c $(CFLAGS) -fPIE -pie
gcc *.o -o lib $(CFLAGS) -fPIE -pie
sharedstatic: assemble
gcc -c lib.c $(CFLAGS) --shared -fPIC $(SLFLAGS) -D LIB
gcc *.o -o lib $(CFLAGS) --shared -fPIC $(SLFLAGS) -D LIB
piestatic: assemble
gcc -c lib.c $(CFLAGS) -fPIE -pie $(SLFLAGS)
gcc *.o -o lib $(CFLAGS) -fPIE -pie $(SLFLAGS)