Browse files

Makefile: 'make potion' now creates 'potion.a' to link against (with …

…'-Wl,-flat_namespace').
  • Loading branch information...
1 parent 74c8b3a commit 68e051403551895af0808a448eb741b82a90615a @orangea orangea committed Dec 21, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 Makefile
View
8 Makefile
@@ -12,6 +12,7 @@ DOCHTML = ${DOC:.textile=.html}
PREFIX = /usr/local
CC = gcc
CFLAGS = -Wall -fno-strict-aliasing -Wno-return-type -D_GNU_SOURCE -fpic -rdynamic
+AR ?= ar
DEBUG ?= 0
ECHO = /bin/echo
GREG = tools/greg
@@ -113,14 +114,19 @@ tools/greg: tools/greg.c tools/compile.c tools/tree.c
@${ECHO} CC $@
@${CC} -O3 -DNDEBUG -o $@ tools/greg.c tools/compile.c tools/tree.c -Itools
-potion: ${OBJ_POTION} ${OBJ}
+potion: ${OBJ_POTION} ${OBJ} libpotion.a
@${ECHO} LINK potion
@${CC} ${CFLAGS} ${OBJ_POTION} ${OBJ} ${LIBS} -o potion
@if [ "${DEBUG}" != "1" ]; then \
${ECHO} STRIP potion; \
${STRIP} potion; \
fi
+libpotion.a: ${OBJ_POTION} ${OBJ}
+ @${ECHO} AR $@
+ @if [ -e $@ ]; then rm -f $@; fi
+ @${AR} rcs $@ core/*.o > /dev/null
+
bench: potion test/api/gc-bench
@${ECHO}; \
${ECHO} running GC benchmark; \

0 comments on commit 68e0514

Please sign in to comment.