lemoncake

rbtree based memory allocator
git clone git://git.2f30.org/lemoncake
Log | Files | Refs | README | LICENSE

Makefile (1200B)


      1 # lemoncake - an rbtree based memory allocator
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 SRC = lemoncake.c
      7 OBJ = ${SRC:.c=.o}
      8 
      9 all: options liblemoncake.so
     10 
     11 options:
     12 	@echo lemoncake build options:
     13 	@echo "CFLAGS   = ${CFLAGS}"
     14 	@echo "LDFLAGS  = ${LDFLAGS}"
     15 	@echo "CC       = ${CC}"
     16 
     17 .c.o:
     18 	@echo CC $<
     19 	@${CC} -c ${CFLAGS} $<
     20 
     21 ${OBJ}: config.mk
     22 
     23 liblemoncake.so: ${OBJ}
     24 	@echo CC -o $@
     25 	@${CC} -o $@ ${OBJ} ${LDFLAGS}
     26 
     27 clean:
     28 	@echo cleaning
     29 	@rm -f liblemoncake.so ${OBJ} lemoncake-${VERSION}.tar.gz
     30 
     31 dist: clean
     32 	@echo creating dist tarball
     33 	@mkdir -p lemoncake-${VERSION}
     34 	@cp -R LICENSE Makefile config.mk README TODO \
     35 		spinlock.h tree.h ${SRC} lemoncake-${VERSION}
     36 	@tar -cf lemoncake-${VERSION}.tar lemoncake-${VERSION}
     37 	@gzip lemoncake-${VERSION}.tar
     38 	@rm -rf lemoncake-${VERSION}
     39 
     40 install: all
     41 	@echo installing library file to ${DESTDIR}${PREFIX}/lib
     42 	@mkdir -p ${DESTDIR}${PREFIX}/lib
     43 	@cp -f liblemoncake.so ${DESTDIR}${PREFIX}/lib
     44 	@chmod 755 ${DESTDIR}${PREFIX}/lib/liblemoncake.so
     45 
     46 uninstall:
     47 	@echo removing library file from ${DESTDIR}${PREFIX}/lib
     48 	@rm -f ${DESTDIR}${PREFIX}/lib/liblemoncake.so
     49 
     50 .PHONY: all options clean dist install uninstall