aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
blob: 8d73e26dd6e901a3efb9587e70b6cbdc007991e1 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- makefile -*-
# $Id$
#
# Makefile rules for autofs project
#

# -------------------------------------------------------------------------- #
#  CHECK HERE TO MAKE SURE YOU HAVE ALL THE CORRECT OPTIONS SET              #
# -------------------------------------------------------------------------- #

# Special parameters for glibc.
# If you're compiling for glibc (libc 6), uncomment these.
#YPLIBS    = -lnsl
#LIBRESOLV = -lresolv

# Uncomment these to build hesiod support.  HESIOD should point to the
# hesiod base directory.
#HESIOD =/usr/athena
#HESIOD_LIBS = -Llib/$(HESIOD) -lhesiod $(LIBRESOLV)

# Uncomment this to build NIS+ support.
#NISPLUS=1

# -------------------------------------------------------------------------- #
#  YOU PROBABLY DON'T HAVE TO SET ANY OPTIONS BELOW THIS POINT               #
# -------------------------------------------------------------------------- #

# Root directory contents
SUBDIRS = daemon modules man
INCDIRS = include samples
INCFILES = COPYING COPYRIGHT NEWS README TODO Makefile Makefile.rules \
	   .version

# Compilers, linkers and flags
# The STRIP defined here *must not* remove any dynamic-loading symbols

ifdef DEBUG
CFLAGS    = -O2 -g -DDEBUG
LDFLAGS   = -g
STRIP     = :
else
CFLAGS    = -O3 -fomit-frame-pointer -Wall
LDFLAGS   = -s
STRIP     = strip --strip-debug
endif

CC        = gcc
CXX       = g++
CXXFLAGS  = $(CFLAGS)
LD        = ld
SOLDFLAGS = -shared

# Directory for autofs modules
autofslibdir = $(DESTDIR)/usr/lib/autofs

# Directory to install modules
moddir = $(DESTDIR)/lib/modules/`uname -r`
fsmoddir = $(moddir)/fs

# Where to install the automount program
sbindir = $(DESTDIR)/usr/sbin

# Where to install man pages
mandir = $(DESTDIR)/usr/man

# Kernel compilation rules (this is for "make kernel" to work; not needed
# if you're compiling the autofs kernel code as a part of the kernel itself.
# For "make kernel" to work you need the kernel code to be in the "kernel"
# directory; not included with the autofs distribution.)

# 1. Comment this out if your kernel is *not* SMP
KFLAGS   = -D__SMP__
# 2. Set this to your kernel include files
KINCLUDE = /usr/src/linux/include
# 3. Comment this out if you do *not* use versioned modules
MODFLAGS = -DMODVERSIONS -include $(KINCLUDE)/linux/modversions.h

# Standard rules

.SUFFIXES: .c .o .s .so

.c.o:
	$(CC) $(CFLAGS) -c $<

.c.s:
	$(CC) $(CFLAGS) -S $<

.c.so:
	$(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $<
	$(STRIP) $*.so