Blame Makefile.rules

Packit 8480eb
#
Packit 8480eb
# Makefile rules for autofs project
Packit 8480eb
#
Packit 8480eb
Packit 8480eb
# Root directory contents
Packit Service 03a0e6
SUBDIRS = lib daemon modules man
Packit 8480eb
INCDIRS = include
Packit 8480eb
INCFILES = COPYING COPYRIGHT NEWS README* TODO Makefile Makefile.rules \
Packit 8480eb
	   Makefile.conf.in .version .autofs-* configure.in aclocal.m4 \
Packit 8480eb
	   configure *.patch autofs.spec
Packit 8480eb
Packit 8480eb
# Attempt to be friends with autotools
Packit 8480eb
INSTALLROOT = $(DESTDIR)
Packit 8480eb
Packit 8480eb
# autofs utility library
Packit 8480eb
AUTOFS_LIB = ../lib/autofs.a
Packit 8480eb
Packit 8480eb
# Compilers, linkers and flags
Packit 8480eb
# The STRIP defined here *must not* remove any dynamic-loading symbols
Packit 8480eb
Packit 8480eb
ifdef DMALLOCLIB
Packit 8480eb
DEBUG=1
Packit 8480eb
endif
Packit 8480eb
Packit 8480eb
ifdef DEBUG
Packit 8480eb
CFLAGS    ?= -g -Wall -DDEBUG
Packit 8480eb
LDFLAGS   ?= -g
Packit 8480eb
else
Packit 8480eb
CFLAGS    ?= -O2 -Wall
Packit 8480eb
LDFLAGS   ?= -s
Packit 8480eb
endif
Packit 8480eb
Packit 8480eb
ifdef DONTSTRIP
Packit 8480eb
STRIP     ?= :
Packit 8480eb
else
Packit 8480eb
STRIP     ?= strip --strip-debug
Packit 8480eb
endif
Packit 8480eb
Packit 8480eb
CC        ?= gcc
Packit 8480eb
CXX       ?= g++
Packit 8480eb
CXXFLAGS  ?= $(CFLAGS)
Packit 8480eb
LD        ?= ld
Packit 8480eb
SOLDFLAGS = -shared
Packit 8480eb
Packit 8480eb
CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
Packit 8480eb
LIBS += -lpthread
Packit 8480eb
Packit 8480eb
ifdef TIRPCLIB
Packit 8480eb
CFLAGS += $(TIRPCCFLAGS)
Packit 8480eb
LIBS += $(TIRPCLIB)
Packit 8480eb
endif
Packit 8480eb
Packit 8480eb
ifdef DMALLOCLIB
Packit 8480eb
LIBS += $(DMALLOCLIB)
Packit 8480eb
endif
Packit 8480eb
Packit 8480eb
LIBS += $(LIBCLOCK_GETTIME)
Packit 8480eb
Packit 8480eb
# Standard rules
Packit 8480eb
Packit 8480eb
.SUFFIXES: .c .o .s .so
Packit 8480eb
Packit 8480eb
.c.o:
Packit 8480eb
	$(CC) $(CFLAGS) -c $<
Packit 8480eb
Packit 8480eb
.c.s:
Packit 8480eb
	$(CC) $(CFLAGS) -S $<
Packit 8480eb
Packit 8480eb
.c.so:
Packit 8480eb
	$(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(LDFLAGS) $(AUTOFS_LIB) $(LIBS)
Packit 8480eb
	$(STRIP) $*.so