-
Notifications
You must be signed in to change notification settings - Fork 13.9k
/
Makefile
32 lines (24 loc) · 1.03 KB
/
Makefile
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
VPATH=../../source/extensions/posix_sample
OPENSSL=../../source/openssl/include
COMMON=../../source/common
SERVER=../../source/server
CFLAGS=-fno-stack-protector -nostdinc -nostdlib -fPIC -DPIC -g -Wall
CFLAGS+=-D_UNIX -D__linux__
CFLAGS+=-I${COMMON} -I${SERVER} -I${OPENSSL}
CFLAGS+= -I ../../source/bionic/libc/include -I ../../source/bionic/libc/kernel/common/linux/ -I ../../source/bionic/libc/kernel/common/ -I ../../source/bionic/libc/arch-x86/include/
CFLAGS+= -I ../../source/bionic/libc/kernel/arch-x86/
CFLAGS+= -Dwchar_t="char" -fno-builtin -D_SIZE_T_DECLARED -DElf_Size="u_int32_t"
CFLAGS+= -D_BYTE_ORDER=_LITTLE_ENDIAN
CFLAGS+= -lgcc -L../../source/bionic/compiled -gstabs+
CFLAGS+= -fPIC -Os
CFLAGS+= -I../../source/extensions/stdapi/server -lc -lsupport
CFLAGS+= -march=i386 -m32
objects = test.o
all: posix_sample.so
posix_sample.so: test.o
gcc -shared $(CFLAGS) -o $@ $(objects)
# And, once done:
# copy posix_sample.so to data/meterpreter/ext_server_posix_sample.lso and "use posix_sample"
.PHONY: clean
clean:
rm -f *.o *.so *~