me8100_test_dio/Makefile
changeset 3 fc24e3b47731
parent 0 c9b8efdb5369
child 4 a90b94337569
--- a/me8100_test_dio/Makefile	Wed Jan 16 14:02:54 2002 +0100
+++ b/me8100_test_dio/Makefile	Wed Jan 16 15:54:58 2002 +0100
@@ -5,11 +5,20 @@
 # $make 	  generates the executable me8100_test_dio
 # $make clean     deletes all files including *.o and *~ 
 
-me8100_test_dio:me8100_test_dio.o
-	gcc -o me8100_test_dio me8100_test_dio.o 
+# KERNEL_DIR should be set in environment.
+CPPFLAGS += -I.. -I$(KERNEL_DIR)/include
+CFLAGS += -Wall -O
+
+bin_PROGRAMS = me8100_test_dio wtest rtest
 
-me8100_test_dio.o:me8100_test_dio.c ../me8100.h
-	gcc -c me8100_test_dio.c -Wall -O
+.PHONY:	all clean
+
+all: $(bin_PROGRAMS)
+
+# Dependencies
+me8100_test_dio.o: me8100_test_dio.c ../me8100.h
+rtest.o: rtest.c ../me8100.h 
+wtest.o: rtest.c ../me8100.h
 
 clean:
-	rm -f *.o *~
\ No newline at end of file
+	rm -f core *.o *~ $(bin_PROGRAMS)