# $Id: Makefile,v 1.2 2003/12/25 12:06:18 tanahi Exp $
#
# Makefile for autofs
#

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

SRCS = automount.c spawn.c module.c mount.c
OBJS = automount.o spawn.o module.o mount.o

version := $(shell cat ../.version)

#CFLAGS += -rdynamic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -DVERSION_STRING=\"$(version)\" -I../include
CFLAGS += -rdynamic -DAUTOFS_LIB_DIR=\"/usr/lib/autofs\" -DVERSION_STRING=\"$(version)\" -I../include
LDFLAGS += -Wl,-rpath=/usr/lib/autofs -rdynamic

## define USE_DL in automount.h
#LIBS = -ldl
## undef USE_DL in automount.h
LIBS = ../modules/lookup_file.a ../modules/parse_sun.a ../modules/mount_nfs.a ../modules/mount_bind.a ../modules/mount_generic.a

all: automount

automount: $(OBJS)
	$(CC) $(LDFLAGS) -o automount $(OBJS) $(LIBS)
#	$(STRIP) automount

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

install: all
#	install -c automount -m 755 $(INSTALLROOT)$(sbindir)
	$(STRIP) -o $(INSTALLROOT)$(sbindir)/automount automount


