-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
38 lines (33 loc) · 802 Bytes
/
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
33
34
35
36
37
38
# injcode/Makefile
#
CXXFLAGS=-g -W -Wall -pipe -O2
GIT=git
ECHO=echo
SED=sed
GZIP=gzip
TAR=tar
GPG=gpg
all: injcode
injcode: injcode.o \
inject.o \
retty.o \
testmodule.o \
closemodule.o \
dup2module.o \
shellcode-test-linux-ia32.o \
shellcode-close-linux-ia32.o \
shellcode-dup2-linux-ia32.o \
shellcode-retty-linux-ia32.o
$(CXX) $(CXXFLAGS) -o $@ $^ -lutil
injcode-%.tar.gz:
$(GIT) archive --format=tar \
--prefix=$(shell $(ECHO) $@ | $(SED) 's/\.tar\.gz//')/ \
injcode-$(shell $(ECHO) $@|$(SED) 's/.*-//'|$(SED) 's/\.tar\.gz//') \
| $(TAR) --delete injcode-$(shell $(ECHO) $@|$(SED) 's/.*-//'|$(SED) 's/\.tar\.gz//')/.be | $(GZIP) -9 > $@
$(GPG) -b -a $@
pt:
g++ -Wall -W -g -o pt pt.cc shellcode-linux-ia32.S -lutil
b.s:
gcc -c -g -Wa,-a,-ad b.c > b.lst
clean:
rm -f *.o injcode