aboutsummaryrefslogtreecommitdiffstats
path: root/modules/Makefile
blob: 7d6634cc46a1ac33d749dca56db84fadc115f249 (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
# $Id$
#
# Makefile for autofs
#

include ../Makefile.rules

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

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

ifdef HESIOD
  SRCS += lookup_hesiod.c  parse_hesiod.c
  MODS += lookup_hesiod.so parse_hesiod.so
endif

ifdef NISPLUS
  SRCS += lookup_nisplus.c
  MODS += lookup_nisplus.so
endif

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

all: $(MODS)

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

install: all
	install -d -m 755 $(autofslibdir)
	install -c $(MODS) -m 644 -o root $(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) -I$(HESIOD)/include -o lookup_hesiod.so \
		lookup_hesiod.c $(HESIOD_LIBS)
	$(STRIP) lookup_hesiod.so