aboutsummaryrefslogtreecommitdiffstats
path: root/modules/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
committerH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
commite1dbb9fe60aa8bf48b07ce2896838f76cc98e226 (patch)
tree87f278ba5cb3d2738aa2061a17a01a18474dfe7e /modules/Makefile
parent43d9d88fd0160c7beecba8b78227cc7247e8d6e9 (diff)
downloadautofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.gz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.xz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.zip
Make autofs self-configuring (using autoconf)
Diffstat (limited to 'modules/Makefile')
-rw-r--r--modules/Makefile35
1 files changed, 22 insertions, 13 deletions
diff --git a/modules/Makefile b/modules/Makefile
index 7d6634c..3c1ddc8 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -3,29 +3,38 @@
# Makefile for autofs
#
+include ../Makefile.conf
include ../Makefile.rules
-SRCS = lookup_yp.c lookup_file.c lookup_program.c \
+SRCS := lookup_yp.c lookup_file.c lookup_program.c \
parse_sun.c \
- mount_generic.c mount_ext2.c mount_nfs.c mount_smbfs.c \
- mount_afs.c mount_autofs.c
+ mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c
-MODS = lookup_yp.so lookup_file.so lookup_program.so \
+MODS := lookup_yp.so lookup_file.so lookup_program.so \
parse_sun.so \
- mount_generic.so mount_ext2.so mount_nfs.so mount_smbfs.so \
- mount_afs.so mount_autofs.so
+ mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so
-ifdef HESIOD
+ifeq ($(EXT2FS), 1)
+ SRCS += mount_ext2.c
+ MODS += mount_ext2.so
+endif
+
+ifeq ($(SMBFS), 1)
+ SRCS += mount_smbfs.c
+ MODS += mount_smbfs.so
+endif
+
+ifeq ($(HESIOD), 1)
SRCS += lookup_hesiod.c parse_hesiod.c
MODS += lookup_hesiod.so parse_hesiod.so
endif
-ifdef NISPLUS
+ifeq ($(NISPLUS), 1)
SRCS += lookup_nisplus.c
MODS += lookup_nisplus.so
endif
-CFLAGS += -I../include -fpic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\"
+CFLAGS += -I../include -fpic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -DPATH_AUTOMOUNT=\"$(sbindir)/automount\"
all: $(MODS)
@@ -33,8 +42,8 @@ clean:
rm -f *.o *.s *.so
install: all
- install -d -m 755 $(autofslibdir)
- install -c $(MODS) -m 644 -o root $(autofslibdir)
+ install -d -m 755 $(INSTALLROOT)$(autofslibdir)
+ install -c $(MODS) -m 644 $(INSTALLROOT)$(autofslibdir)
#
# Ad hoc compilation rules for modules which need auxilliary libraries
@@ -49,6 +58,6 @@ lookup_nisplus.so: lookup_nisplus.c
$(STRIP) lookup_nisplus.so
lookup_hesiod.so: lookup_hesiod.c
- $(CC) $(SOLDFLAGS) $(CFLAGS) -I$(HESIOD)/include -o lookup_hesiod.so \
- lookup_hesiod.c $(HESIOD_LIBS)
+ $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
+ lookup_hesiod.c $(LIBHESIOD)
$(STRIP) lookup_hesiod.so