pass ldflags
--
diff --git a/scripts/utils.mk b/scripts/utils.mk
index 4d0f8bc..0175b38 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -101,11 +101,11 @@ extract_example =				\
 
 do_sample_build =							\
 	$(Q)($(print_sample_build)					\
-	$(CC) -o $1 $2 $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) -lpthread)
+	$(CC) -o $1 $2 $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) -lpthread $(LDFLAGS))
 
 do_sample_obj =									\
 	$(Q)($(print_sample_obj)						\
-	$(CC) -g -Wall -c $(CFLAGS) -o $1 $2 -I../include/ $(LIBTRACEEVENT_INCLUDES))
+	$(CC) -g -Wall -c $(CFLAGS) -o $1 $2 -I../include/ $(LIBTRACEEVENT_INCLUDES) $(LDFLAGS))
 
 ifneq ($(findstring $(MAKEFLAGS), w),w)
 PRINT_DIR = --no-print-directory
