|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
# Makefile for autofs
|
|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
-include ../Makefile.conf
|
|
Packit |
8480eb |
include ../Makefile.rules
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
SRCS := lookup_file.c lookup_program.c lookup_userhome.c \
|
|
Packit |
8480eb |
lookup_multi.c lookup_hosts.c lookup_dir.c \
|
|
Packit |
8480eb |
parse_sun.c parse_amd.c \
|
|
Packit |
8480eb |
mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c \
|
|
Packit |
8480eb |
mount_changer.c mount_bind.c
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
MODS := lookup_file.so lookup_program.so lookup_userhome.so \
|
|
Packit |
8480eb |
lookup_multi.so lookup_hosts.so lookup_dir.so \
|
|
Packit |
8480eb |
parse_sun.so parse_amd.so \
|
|
Packit |
8480eb |
mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so \
|
|
Packit |
8480eb |
mount_changer.so mount_bind.so
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
YACCSRC = amd_tok.c amd_parse.tab.c amd_parse.tab.h
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(EXT2FS), 1)
|
|
Packit |
8480eb |
SRCS += mount_ext2.c
|
|
Packit |
8480eb |
MODS += mount_ext2.so
|
|
Packit |
8480eb |
else
|
|
Packit |
8480eb |
ifeq ($(EXT3FS), 1)
|
|
Packit |
8480eb |
SRCS += mount_ext2.c
|
|
Packit |
8480eb |
MODS += mount_ext2.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(HESIOD), 1)
|
|
Packit |
8480eb |
SRCS += lookup_hesiod.c parse_hesiod.c
|
|
Packit |
8480eb |
MODS += lookup_hesiod.so parse_hesiod.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(NISPLUS), 1)
|
|
Packit |
8480eb |
SRCS += lookup_nisplus.c
|
|
Packit |
8480eb |
MODS += lookup_nisplus.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(YPCLNT), 1)
|
|
Packit |
8480eb |
SRCS += lookup_yp.c
|
|
Packit |
8480eb |
MODS += lookup_yp.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(LDAP), 1)
|
|
Packit |
8480eb |
SRCS += lookup_ldap.c
|
|
Packit |
8480eb |
MODS += lookup_ldap.so
|
|
Packit |
8480eb |
LDAP_FLAGS += $(XML_FLAGS) -DLDAP_THREAD_SAFE
|
|
Packit |
8480eb |
LIBLDAP += $(XML_LIBS)
|
|
Packit |
8480eb |
ifeq ($(SASL), 1)
|
|
Packit |
8480eb |
SASL_OBJ = cyrus-sasl.o cyrus-sasl-extern.o
|
|
Packit |
8480eb |
LDAP_FLAGS += $(SASL_FLAGS) $(KRB5_FLAGS)
|
|
Packit |
8480eb |
LIBLDAP += $(LIBSASL) $(KRB5_LIBS)
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
ifeq ($(SSSD), 1)
|
|
Packit |
8480eb |
CFLAGS += -DSSS_LIB_DIR=\"$(ssslibdir)\"
|
|
Packit |
8480eb |
SRCS += lookup_sss.c
|
|
Packit |
8480eb |
MODS += lookup_sss.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
CFLAGS += -I../include -I../lib -fPIC -D_GNU_SOURCE
|
|
Packit |
8480eb |
CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\"
|
|
Packit |
8480eb |
CFLAGS += -DAUTOFS_MAP_DIR=\"$(autofsmapdir)\"
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
all: $(MODS)
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
clean:
|
|
Packit |
8480eb |
rm -f *.o *.s *.so *~ *.output $(YACCSRC)
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
# mount_smbfs.so is an obsolete module which must be removed
|
|
Packit |
8480eb |
install: all
|
|
Packit |
8480eb |
install -d -m 755 $(INSTALLROOT)$(autofslibdir)
|
|
Packit |
8480eb |
install -c $(MODS) -m 755 $(INSTALLROOT)$(autofslibdir)
|
|
Packit |
8480eb |
-rm -f $(INSTALLROOT)$(autofslibdir)/mount_smbfs.so
|
|
Packit |
8480eb |
ln -fs lookup_file.so $(INSTALLROOT)$(autofslibdir)/lookup_files.so
|
|
Packit |
8480eb |
ln -fs lookup_yp.so $(INSTALLROOT)$(autofslibdir)/lookup_nis.so
|
|
Packit |
8480eb |
ifeq ($(LDAP), 1)
|
|
Packit |
8480eb |
ln -fs lookup_ldap.so $(INSTALLROOT)$(autofslibdir)/lookup_ldaps.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
ln -fs mount_nfs.so $(INSTALLROOT)$(autofslibdir)/mount_nfs4.so
|
|
Packit |
8480eb |
ifeq ($(EXT2FS), 1)
|
|
Packit |
8480eb |
ifeq ($(EXT3FS), 1)
|
|
Packit |
8480eb |
ln -fs mount_ext2.so $(INSTALLROOT)$(autofslibdir)/mount_ext3.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
ifeq ($(EXT4FS), 1)
|
|
Packit |
8480eb |
ln -fs mount_ext2.so $(INSTALLROOT)$(autofslibdir)/mount_ext4.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
else ifeq ($(EXT3FS), 1)
|
|
Packit |
8480eb |
mv $(INSTALLROOT)$(autofslibdir)/mount_ext2.so $(INSTALLROOT)$(autofslibdir)/mount_ext3.so
|
|
Packit |
8480eb |
ifeq ($(EXT4FS), 1)
|
|
Packit |
8480eb |
ln -fs mount_ext3.so $(INSTALLROOT)$(autofslibdir)/mount_ext4.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
else ifeq ($(EXT4FS), 1)
|
|
Packit |
8480eb |
mv $(INSTALLROOT)$(autofslibdir)/mount_ext2.so $(INSTALLROOT)$(autofslibdir)/mount_ext4.so
|
|
Packit |
8480eb |
endif
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
amd_tok.c: amd_tok.l
|
|
Packit |
8480eb |
$(LEX) -o$@ -Pamd_ $?
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
amd_tok.o: amd_tok.c amd_parse.tab.h
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
amd_parse.tab.c amd_parse.tab.h: amd_parse.y
|
|
Packit |
8480eb |
$(YACC) -v -d -p amd_ -b amd_parse $?
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
parse_amd.so: parse_amd.c amd_parse.tab.o amd_tok.o
|
|
Packit |
8480eb |
$(CC) $(SOLDFLAGS) $(CFLAGS) -o parse_amd.so \
|
|
Packit |
8480eb |
parse_amd.c amd_parse.tab.o amd_tok.o $(LDFLAGS) $(AUTOFS_LIB) $(LIBS)
|
|
Packit |
8480eb |
$(STRIP) parse_amd.so
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
#
|
|
Packit |
8480eb |
# Ad hoc compilation rules for modules which need auxilliary libraries
|
|
Packit |
8480eb |
#
|
|
Packit Service |
ca6a1f |
lookup_yp.so: lookup_yp.c
|
|
Packit Service |
ca6a1f |
$(CC) $(SOLDFLAGS) $(CFLAGS) $(NSLCFLAGS) -o lookup_yp.so \
|
|
Packit Service |
ca6a1f |
lookup_yp.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBS) $(NSLLIB)
|
|
Packit Service |
ca6a1f |
$(STRIP) lookup_yp.so
|
|
Packit Service |
ca6a1f |
|
|
Packit Service |
ca6a1f |
lookup_nisplus.so: lookup_nisplus.c
|
|
Packit Service |
ca6a1f |
$(CC) $(SOLDFLAGS) $(CFLAGS) $(NSLCFLAGS) -o lookup_nisplus.so \
|
|
Packit Service |
ca6a1f |
lookup_nisplus.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBS) $(NSLLIB)
|
|
Packit Service |
ca6a1f |
$(STRIP) lookup_nisplus.so
|
|
Packit Service |
ca6a1f |
|
|
Packit |
8480eb |
lookup_hesiod.so: lookup_hesiod.c
|
|
Packit |
8480eb |
$(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
|
|
Packit |
8480eb |
lookup_hesiod.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV) $(LIBS)
|
|
Packit |
8480eb |
$(STRIP) lookup_hesiod.so
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
cyrus-sasl.o: cyrus-sasl.c
|
|
Packit |
8480eb |
$(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
cyrus-sasl-extern.o: cyrus-sasl-extern.c
|
|
Packit |
8480eb |
$(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
|
|
Packit |
8480eb |
$(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
|
|
Packit |
8480eb |
lookup_ldap.c dclist.o base64.o $(SASL_OBJ) \
|
|
Packit |
8480eb |
$(LDFLAGS) $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV) $(LIBS)
|
|
Packit |
8480eb |
$(STRIP) lookup_ldap.so
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
mount_nfs.so: mount_nfs.c replicated.o
|
|
Packit |
8480eb |
$(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
|
|
Packit |
8480eb |
mount_nfs.c replicated.o $(LDFLAGS) $(AUTOFS_LIB) $(LIBS)
|
|
Packit |
8480eb |
$(STRIP) mount_nfs.so
|
|
Packit |
8480eb |
|