summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--usr/Makefile7
-rw-r--r--utils/Makefile7
-rw-r--r--utils/fwparam_ibft/Makefile12
4 files changed, 26 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8bbe904..16ef1df 100644
--- a/Makefile
+++ b/Makefile
@@ -116,4 +116,9 @@ install_iname:
echo "***************************************************" ; \
fi
+depend:
+ for dir in usr utils utils/fwparam_ibft; do \
+ $(MAKE) -C $$dir $@; \
+ done
+
# vim: ft=make tw=72 sw=4 ts=4:
diff --git a/usr/Makefile b/usr/Makefile
index 4a8dcae..192faab 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -53,4 +53,9 @@ iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) iscsistart.o \
$(CC) $(CFLAGS) -static $^ -o $@
clean:
- rm -f *.o $(PROGRAMS)
+ rm -f *.o $(PROGRAMS) .depend
+
+depend:
+ gcc $(CFLAGS) -M `ls *.c` > .depend
+
+-include .depend
diff --git a/utils/Makefile b/utils/Makefile
index b376129..2c7e891 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -9,4 +9,9 @@ iscsi-iname: md5.o iscsi-iname.o
$(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@
clean:
- rm -f *.o $(PROGRAMS)
+ rm -f *.o $(PROGRAMS) .depend
+
+depend:
+ gcc $(CFLAGS) -M `ls *.c` > .depend
+
+-include .depend
diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
index ee090c1..86e190e 100644
--- a/utils/fwparam_ibft/Makefile
+++ b/utils/fwparam_ibft/Makefile
@@ -5,7 +5,13 @@ PROGRAMS = fwparam_ibft
all: $(PROGRAMS)
-fwparam_ibft: fwparam_ibft.c fwparam_ibft.h
- $(CC) $(CFLAGS) $^ -o $@
+fwparam_ibft: fwparam_ibft.o
+ $(CC) $(CFLAGS) $< -o $@
+
clean:
- rm -f *.o $(PROGRAMS)
+ rm -f *.o $(PROGRAMS) .depend
+
+depend:
+ gcc $(CFLAGS) -M `ls *.c` > .depend
+
+-include .depend