--- a/Makefile Wed Jan 16 14:02:54 2002 +0100
+++ b/Makefile Wed Jan 16 15:54:58 2002 +0100
@@ -6,20 +6,25 @@
# $make test8100i generates the executable test8100i
# $make clean deletes all files including *.o and *~
-me8100.o:me8100.c me8100.h
- gcc -c me8100.c -Wall -O
+# KERNEL_DIR should be set in environment
+#KERNEL_DIR = /usr/src/linux
-test8100:test8100.o
- gcc -o test8100 test8100.o
+SUBDIRS = me8100_test_dio me8100_test_int
+
+CPPFLAGS += -I$(KERNEL_DIR)/include
+CFLAGS += -O -Wall
-test8100.o:test8100.c me8100.h
- gcc -c test8100.c -Wall -O
+.PHONY: all clean
+
+all: me8100.o
+ for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
-test8100i:test8100i.o
- gcc -o test8100i test8100i.o
+tags: *.c *.h
+ ctags $^
-test8100i.o:test8100i.c me8100.h
- gcc -c test8100i.c -Wall -O
+# Dependencies
+me8100.o: me8100.c me8100.h
clean:
- rm -f *.o *~
\ No newline at end of file
+ rm -f *.o *~ tags
+ for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done