Mercurial > jemalloc
annotate Makefile @ 1:daf7ce634fb2 default tip
- add pointer size specifier for 64bit systems. (default)
- link against libpthread
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 05 Oct 2009 18:05:04 +0900 |
parents | 9a44d900ee55 |
children |
rev | line source |
---|---|
0 | 1 PREFIX = /usr/local |
2 | |
1
daf7ce634fb2
- add pointer size specifier for 64bit systems. (default)
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
3 #for 64bit systems |
daf7ce634fb2
- add pointer size specifier for 64bit systems. (default)
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
4 PTRFLAG=-DMOZ_MEMORY_SIZEOF_PTR_2POW=3 |
daf7ce634fb2
- add pointer size specifier for 64bit systems. (default)
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
5 |
0 | 6 PRODUCT = libjemalloc |
7 MAJOR = 1 | |
8 MINOR = 0 | |
9 REVISION = 0 | |
10 VER = ${MAJOR}.${MINOR}.${REVISION} | |
11 | |
12 CC = gcc | |
13 | |
14 SRCS = jemalloc.c | |
15 PUBHDRS = ${SRCS:.c=.h} | |
16 HDRS = jemalloc.h | |
17 OBJS = ${SRCS:.c=.o} | |
18 | |
19 LIBS = ${PRODUCT}.so ${PRODUCT}.a | |
1
daf7ce634fb2
- add pointer size specifier for 64bit systems. (default)
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
20 CFLAGS += -fPIC -pg -g -DMOZ_MEMORY -DMOZ_MEMORY_LINUX $(PTRFLAG) |
daf7ce634fb2
- add pointer size specifier for 64bit systems. (default)
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
21 LDFLAGS += -shared -Wl,-soname,${SONAME} -pthread |
0 | 22 SONAME = ${PRODUCT}.so.${MAJOR} |
23 | |
24 | |
25 all: ${LIBS} | |
26 | |
27 ${PRODUCT}.so: ${OBJS} | |
28 ${CC} -o $@ ${LDFLAGS} ${OBJS} | |
29 | |
30 ${PRODUCT}.a: ${OBJS} | |
31 ar rc $@ ${OBJS} | |
32 ranlib $@ | |
33 | |
34 ${OBJS} : ${SRCS} ${HDRS} | |
35 | |
36 | |
37 install: | |
38 install -m644 ${PUBHDRS} ${PREFIX}/include/jemalloc.h | |
39 rm -f ${PREFIX}/lib/${PRODUCT}.* | |
40 install -m755 ${PRODUCT}.so ${PREFIX}/lib/${PRODUCT}.so.${VER} | |
41 install -m644 ${PRODUCT}.a ${PREFIX}/lib | |
42 ln -sf ${PREFIX}/lib/${PRODUCT}.so.${VER} ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} | |
43 ln -sf ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} ${PREFIX}/lib/${PRODUCT}.so | |
44 | |
45 clean: | |
46 rm -f ${LIBS} ${OBJS} | |
47 | |
48 distclean: clean | |
49 rm -f *~ core* |