forked from pmusa/lmprof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (21 loc) · 803 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
CC = gcc
CFLAGS = -Wall -ansi -pedantic -fPIC -shared
LUA_DIR = /usr/include/lua5.2
LUA_LIB = /usr/local/lib/lua/5.2
LUA_CFLAGS = -I$(LUA_DIR)
LUA_LIBS = -llua5.2
all: lmprof.so
install: lmprof.so
mkdir -p $(LUA_LIB)/lmprof && cp src/reduce/*.lua $(LUA_LIB)/lmprof && cp lmprof.so /usr/local/lib/lua/5.2/
lmprof.so: lmprof.o
cd src && $(CC) lmprof_lstrace.o lmprof_stack.o lmprof_hash.o lmprof.o -o lmprof.so $(CFLAGS) $(LUA_LIBS) && mv lmprof.so ../
lmprof.o: lmprof_stack.o lmprof_hash.o lmprof_lstrace.o
cd src && $(CC) -c lmprof.c $(CFLAGS) $(LUA_CFLAGS)
lmprof_lstrace.o:
cd src && $(CC) -c lmprof_lstrace.c $(CFLAGS) $(LUA_CFLAGS)
lmprof_hash.o:
cd src && $(CC) -c lmprof_hash.c $(CFLAGS)
lmprof_stack.o:
cd src && $(CC) -c lmprof_stack.c $(CFLAGS)
clean:
rm -f src/*.o lmprof.so