Index: config.mk
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/config.mk,v
retrieving revision 1.8
diff -u -r1.8 config.mk
--- config.mk	9 Oct 2009 17:56:07 -0000	1.8
+++ config.mk	23 Oct 2009 21:29:21 -0000
@@ -22,7 +22,13 @@
 
 
 # Default stuff common to all testcases
+#
+# THIS IS NOT TO BE INCLUDED WITH lib!!!
 
-CPPFLAGS += -I$(abs_top_srcdir)/testcases/realtime/include -D_GNU_SOURCE
-CFLAGS   += -Wall
-LDLIBS   += -lrealtime -lpthread -lrt -lm
+realtime_builddir	:= $(abs_top_builddir)/testcases/realtime
+realtime_srcdir		:= $(abs_top_srcdir)/testcases/realtime
+
+CPPFLAGS		+= -I$(realtime_srcdir)/include
+CFLAGS			+= -D_GNU_SOURCE
+LDLIBS			+= -lrealtime -lpthread -lrt -lm
+LDFLAGS			+= -L$(realtime_builddir)/lib
Index: lib/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/lib/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- lib/Makefile	9 Oct 2009 17:56:08 -0000	1.4
+++ lib/Makefile	23 Oct 2009 21:29:21 -0000
@@ -24,6 +24,12 @@
 
 include $(top_srcdir)/include/mk/env_pre.mk
 
+CPPFLAGS		+= -I$(abs_srcdir)/../include
+
+CFLAGS			+= -D_GNU_SOURCE
+
+LDLIBS			+= -lrealtime -lpthread -lrt -lm
+
 LIB			:= librealtime.a
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+include $(top_srcdir)/include/mk/lib.mk
