-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 823 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
CFLAGS = -O3 -march=native -ggdb3 -m32 -std=gnu99 -fshort-wchar -Wno-multichar -Iloadlibrary/include -mstackrealign
CPPFLAGS=-DNDEBUG -D_GNU_SOURCE -I. -Iloadlibrary/intercept -Iloadlibrary/peloader
LDFLAGS = $(CFLAGS) -m32 -lm
LDLIBS = loadlibrary/intercept/libdisasm.a -Wl,--whole-archive,loadlibrary/peloader/libpeloader.a,--no-whole-archive
.PHONY: clean peloader intercept
TARGETS=loader | peloader
all: $(TARGETS)
-mkdir -p faketemp
intercept:
make -C loadlibrary/intercept all
peloader:
make -C loadlibrary/peloader all
intercept/hook.o: intercept
loader: loader.o loadlibrary/intercept/hook.o | peloader
$(CC) $(CFLAGS) $^ -o $@ $(LDLIBS) $(LDFLAGS)
clean:
rm -f a.out core *.o core.* vgcore.* gmon.out loader
make -C loadlibrary/intercept clean
make -C loadlibrary/peloader clean
rm -rf faketemp