aboutsummaryrefslogtreecommitdiffstats
path: root/modules/Makefile
blob: 3c1ddc8b15304baf3eccbcfc73189396de39a0bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $Id$
#
# Makefile for autofs
#

include ../Makefile.conf
include ../Makefile.rules

SRCS :=	lookup_yp.c  lookup_file.c  lookup_program.c  \
	parse_sun.c  \
	mount_generic.c  mount_nfs.c  mount_afs.c  mount_autofs.c

MODS :=	lookup_yp.so lookup_file.so lookup_program.so \
	parse_sun.so \
	mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so

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

ifeq ($(NISPLUS), 1)
  SRCS += lookup_nisplus.c
  MODS += lookup_nisplus.so
endif

CFLAGS += -I../include -fpic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -DPATH_AUTOMOUNT=\"$(sbindir)/automount\"

all: $(MODS)

clean:
	rm -f *.o *.s *.so

install: all
	install -d -m 755 $(INSTALLROOT)$(autofslibdir)
	install -c $(MODS) -m 644 $(INSTALLROOT)$(autofslibdir)

#
# Ad hoc compilation rules for modules which need auxilliary libraries
#
lookup_yp.so: lookup_yp.c
	$(CC) $(SOLDFLAGS) $(CFLAGS) -o lookup_yp.so lookup_yp.c $(LIBNSL)
	$(STRIP) lookup_yp.so

lookup_nisplus.so: lookup_nisplus.c
	$(CC) $(SOLDFLAGS) $(CFLAGS) -o lookup_nisplus.so lookup_nisplus.c \
		$(LIBNSL)
	$(STRIP) lookup_nisplus.so

lookup_hesiod.so: lookup_hesiod.c
	$(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
		lookup_hesiod.c $(LIBHESIOD)
	$(STRIP) lookup_hesiod.so