-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 1.02 KB
/
Makefile
File metadata and controls
37 lines (26 loc) · 1.02 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
PREFIX=/usr/local
CFLAGS=-Wall -g -g -O2 -DPREFIX="\"${PREFIX}\"" -fPIC
LDLIBS= -ldl -lpthread -lnuma
.PHONY: all clean
all: makefile.dep pinthreads pin.so pinhook.so tests/testhooks tests/delayedthreads tests/multipleprocesses
makefile.dep: *.[Cch]
for i in *.[Cc]; do ${CC} -MM "$${i}" ${CFLAGS}; done > $@
-include makefile.dep
pin.so: pin.o parse_args.o shm.o pinserver.o
${CC} -shared -o $@ $^ ${LDLIBS}
pinthreads: pinthreads.o parse_args.o shm.o
${CC} ${CFLAGS} -o $@ $^ ${LDLIBS}
pinhook.so: pinhook.o
${CC} -shared -o $@ $^ ${LDLIBS}
tests/testhooks: tests/testhooks.o pinhook.so
${CC} ${CFLAGS} -o $@ $^ ${LDLIBS} pinhook.so
tests/delayedthreads: tests/delayedthreads.o
${CC} ${CFLAGS} -o $@ $^ ${LDLIBS}
tests/multipleprocesses: tests/multipleprocesses.o
${CC} ${CFLAGS} -o $@ $^ ${LDLIBS}
install:
mkdir -p ${PREFIX}/lib/pinthreads/
cp pin.so ${PREFIX}/lib/pinthreads/
cp pinthreads ${PREFIX}/bin
clean:
rm -f *.o *.so makefile.dep pinthreads tests/testhooks tests/delayedthreads tests/multipleprocesses tests/*.o