Mercurial > jemalloc
comparison Makefile @ 0:9a44d900ee55
initial import
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 05 Oct 2009 16:06:43 +0900 |
parents | |
children | daf7ce634fb2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9a44d900ee55 |
---|---|
1 PREFIX = /usr/local | |
2 | |
3 PRODUCT = libjemalloc | |
4 MAJOR = 1 | |
5 MINOR = 0 | |
6 REVISION = 0 | |
7 VER = ${MAJOR}.${MINOR}.${REVISION} | |
8 | |
9 CC = gcc | |
10 | |
11 SRCS = jemalloc.c | |
12 PUBHDRS = ${SRCS:.c=.h} | |
13 HDRS = jemalloc.h | |
14 OBJS = ${SRCS:.c=.o} | |
15 | |
16 LIBS = ${PRODUCT}.so ${PRODUCT}.a | |
17 CFLAGS += -fPIC -pg -g -DMOZ_MEMORY -DMOZ_MEMORY_LINUX | |
18 LDFLAGS += -shared -Wl,-soname,${SONAME} | |
19 SONAME = ${PRODUCT}.so.${MAJOR} | |
20 | |
21 | |
22 all: ${LIBS} | |
23 | |
24 ${PRODUCT}.so: ${OBJS} | |
25 ${CC} -o $@ ${LDFLAGS} ${OBJS} | |
26 | |
27 ${PRODUCT}.a: ${OBJS} | |
28 ar rc $@ ${OBJS} | |
29 ranlib $@ | |
30 | |
31 ${OBJS} : ${SRCS} ${HDRS} | |
32 | |
33 | |
34 install: | |
35 install -m644 ${PUBHDRS} ${PREFIX}/include/jemalloc.h | |
36 rm -f ${PREFIX}/lib/${PRODUCT}.* | |
37 install -m755 ${PRODUCT}.so ${PREFIX}/lib/${PRODUCT}.so.${VER} | |
38 install -m644 ${PRODUCT}.a ${PREFIX}/lib | |
39 ln -sf ${PREFIX}/lib/${PRODUCT}.so.${VER} ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} | |
40 ln -sf ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} ${PREFIX}/lib/${PRODUCT}.so | |
41 | |
42 clean: | |
43 rm -f ${LIBS} ${OBJS} | |
44 | |
45 distclean: clean | |
46 rm -f *~ core* |