Mercurial > jemalloc
view 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 |
line wrap: on
line source
PREFIX = /usr/local #for 64bit systems PTRFLAG=-DMOZ_MEMORY_SIZEOF_PTR_2POW=3 PRODUCT = libjemalloc MAJOR = 1 MINOR = 0 REVISION = 0 VER = ${MAJOR}.${MINOR}.${REVISION} CC = gcc SRCS = jemalloc.c PUBHDRS = ${SRCS:.c=.h} HDRS = jemalloc.h OBJS = ${SRCS:.c=.o} LIBS = ${PRODUCT}.so ${PRODUCT}.a CFLAGS += -fPIC -pg -g -DMOZ_MEMORY -DMOZ_MEMORY_LINUX $(PTRFLAG) LDFLAGS += -shared -Wl,-soname,${SONAME} -pthread SONAME = ${PRODUCT}.so.${MAJOR} all: ${LIBS} ${PRODUCT}.so: ${OBJS} ${CC} -o $@ ${LDFLAGS} ${OBJS} ${PRODUCT}.a: ${OBJS} ar rc $@ ${OBJS} ranlib $@ ${OBJS} : ${SRCS} ${HDRS} install: install -m644 ${PUBHDRS} ${PREFIX}/include/jemalloc.h rm -f ${PREFIX}/lib/${PRODUCT}.* install -m755 ${PRODUCT}.so ${PREFIX}/lib/${PRODUCT}.so.${VER} install -m644 ${PRODUCT}.a ${PREFIX}/lib ln -sf ${PREFIX}/lib/${PRODUCT}.so.${VER} ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} ln -sf ${PREFIX}/lib/${PRODUCT}.so.${MAJOR} ${PREFIX}/lib/${PRODUCT}.so clean: rm -f ${LIBS} ${OBJS} distclean: clean rm -f *~ core*