ifdef DEBUG
CFLAGS ?= -g -Wall -DDEBUG
LDFLAGS = -g
AUTOFS_LDFLAGS = -g
STRIP = :
else
ifdef DONTSTRIP
CFLAGS ?= -O2 -g
CFLAGS ?= -O2 -Wall
LDFLAGS = -s
AUTOFS_LDFLAGS = -s
STRIP = strip --strip-debug
endif
SOLDFLAGS = -shared
CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
LDFLAGS += -lpthread
ifdef DMALLOCLIB
LDFLAGS += $(DMALLOCLIB)
AUTOFS_LDFLAGS += $(DMALLOCLIB)
# Standard rules
all: automount
automount: $(OBJS) $(AUTOFS_LIB)
$(CC) $(LDFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
$(CC) $(AUTOFS_LDFLAGS) $(DAEMON_LDFLAGS) $(LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
$(STRIP) automount
clean: