Index: testcases/kernel/io/aio/aio01/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/io/aio/aio01/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- testcases/kernel/io/aio/aio01/Makefile	28 Jan 2009 06:43:09 -0000	1.2
+++ testcases/kernel/io/aio/aio01/Makefile	3 Jul 2009 00:39:55 -0000
@@ -20,13 +20,18 @@
 # name of file	: Makefile						  #
 # description	: make(1) description file                                #
 ###########################################################################
-include ../../../../../config.mk
 
-CFLAGS+=	-I../../../../../include -Wall
-LOADLIBES+=	$(AIO_LIBS) -L../../../../../lib -lltp
+srcdir			?= ../../../../..
 
-SRCS=$(wildcard *.c)
-TARGETS=$(patsubst %.c,%,$(SRCS))
+ifneq ($(MAKECMDGOALS),clean)
+include $(srcdir)/config.mk
+endif
+
+CFLAGS			+= -I$(srcdir)/include -Wall
+LDFLAGS			+= -L$(srcdir)/lib
+LDLIBS			+= $(AIO_LIBS) -lltp
+
+TARGETS			:= $(patsubst %.c,%,$(wildcard *.c))
 
 all: $(TARGETS)
 
@@ -35,5 +40,3 @@
 
 clean:
 	rm -f $(TARGETS)
-
-
