instrument for valgrind
diff --git a/build/exe.mk b/build/exe.mk
index c931bfd..bc16463 100644
--- a/build/exe.mk
+++ b/build/exe.mk
@@ -29,11 +29,9 @@
CCC = g++
endif
NASM = nasm
-# LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static except on OSX
+# override to -dynamic on OSX
ifeq ($(DARWIN_BUILD),yes)
LINKAGE = -dynamic
-else
-LINKAGE = -static
endif
LINK = $(CC) $(LINKAGE)
OBJPATH = $(topdir)/obj
@@ -48,6 +46,7 @@
RELEASE_PROGRAM = $(RELEASE_BINPATH)/$(PROGRAM_NAME)
debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
+valgrind: CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH)
@@ -58,6 +57,7 @@
RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o)
debug : $(ORDINALS_H) $(DEBUG_PROGRAM)
+valgrind: $(ORDINALS_H) $(DEBUG_PROGRAM)
release : $(ORDINALS_H) $(RELEASE_PROGRAM)
$(DEBUG_PROGRAM) : $(DEBUG_OBJS)