| 1 |
# |
| 2 |
# Makefile for autofs |
| 3 |
# |
| 4 |
|
| 5 |
-include ../Makefile.conf |
| 6 |
include ../Makefile.rules |
| 7 |
|
| 8 |
SRCS = automount.c indirect.c direct.c spawn.c module.c mount.c \ |
| 9 |
master.c master_tok.l master_parse.y lookup.c state.c flag.c |
| 10 |
OBJS = automount.o indirect.o direct.o spawn.o module.o mount.o \ |
| 11 |
master.o master_tok.o master_parse.tab.o lookup.o state.o \ |
| 12 |
flag.o |
| 13 |
|
| 14 |
YACCSRC = master_tok.c master_parse.tab.c master_parse.tab.h |
| 15 |
|
| 16 |
version := $(shell cat ../.version) |
| 17 |
|
| 18 |
CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include |
| 19 |
CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" |
| 20 |
CFLAGS += -DAUTOFS_MAP_DIR=\"$(autofsmapdir)\" |
| 21 |
CFLAGS += -DAUTOFS_CONF_DIR=\"$(autofsconfdir)\" |
| 22 |
CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\" |
| 23 |
CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\" |
| 24 |
CFLAGS += -DVERSION_STRING=\"$(version)\" |
| 25 |
LDFLAGS += -rdynamic |
| 26 |
LIBS += -ldl -lpthread |
| 27 |
|
| 28 |
ifeq ($(SYSTEMD), 1) |
| 29 |
CFLAGS += -DWITH_SYSTEMD |
| 30 |
LIBS += $(LIBSYSTEMD) |
| 31 |
endif |
| 32 |
|
| 33 |
ifeq ($(LDAP), 1) |
| 34 |
CFLAGS += $(XML_CFLAGS) |
| 35 |
LIBS += $(XML_LIBS) |
| 36 |
endif |
| 37 |
|
| 38 |
all: automount |
| 39 |
|
| 40 |
automount: $(OBJS) $(AUTOFS_LIB) |
| •41 |
$(CC) $(DAEMON_CFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(LDFLAGS) $(LIBS) $(AUTOFS_LIB_LINK) |
| 42 |
$(STRIP) automount |
| 43 |
|
| 44 |
master_tok.c: master_tok.l |
| 45 |
$(LEX) -o$@ -Pmaster_ $? |
| 46 |
|
| 47 |
master_parse.tab.c master_parse.tab.h: master_parse.y |
| 48 |
$(YACC) -v -d -p master_ -b master_parse $? |
| 49 |
|
| 50 |
master_tok.o: master_tok.c master_parse.tab.h |
| 51 |
|
| 52 |
master_parse.tab.o: master_parse.tab.c master_parse.tab.h |
| 53 |
|
| 54 |
clean: |
| 55 |
rm -f *.o *.s *~ $(YACCSRC) *.output *~ automount |
| 56 |
|
| 57 |
install: all |
| 58 |
install -d -m 755 $(INSTALLROOT)$(sbindir) |
| 59 |
install -c automount -m 755 $(INSTALLROOT)$(sbindir) |
| 60 |
|
| 61 |
|