summaryrefslogtreecommitdiffstats
path: root/fs/autofs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs/Makefile')
-rw-r--r--fs/autofs/Makefile29
1 files changed, 24 insertions, 5 deletions
diff --git a/fs/autofs/Makefile b/fs/autofs/Makefile
index 12f302635..1681c3d31 100644
--- a/fs/autofs/Makefile
+++ b/fs/autofs/Makefile
@@ -1,11 +1,7 @@
#
# Makefile for the linux autofs-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
+# We can build this either out of the kernel tree or the autofs tools tree.
#
O_TARGET := autofs.o
@@ -13,4 +9,27 @@ O_OBJS := dir.o dirhash.o init.o inode.o root.o symlink.o waitq.o
M_OBJS := $(O_TARGET)
+ifdef TOPDIR
+#
+# Part of the kernel code
+#
include $(TOPDIR)/Rules.make
+else
+#
+# Standalone (handy for development)
+#
+include ../Makefile.rules
+
+CFLAGS += -D__KERNEL__ -DMODULE $(KFLAGS) -I../include -I$(KINCLUDE) $(MODFLAGS)
+
+all: $(O_TARGET)
+
+$(O_TARGET): $(O_OBJS)
+ $(LD) -r -o $(O_TARGET) $(O_OBJS)
+
+install: $(O_TARGET)
+ install -c $(O_TARGET) /lib/modules/`uname -r`/fs
+
+clean:
+ rm -f *.o *.s
+endif