--- src/Makefile.orig Fri Jul 27 15:30:54 2007 +++ src/Makefile Fri Jul 27 15:35:04 2007 @@ -1,54 +1,9 @@ -BIN = mathopd -CC = gcc -CFLAGS = -O -Wall -CPPFLAGS = -LDFLAGS = -LIBS = -lcrypt -PREFIX = /usr/local -SBINDIR = $(PREFIX)/sbin +PROG= mathopd +SRCS= +SRCS= base64.c cgi.c config.c core.c dump.c imap.c log.c main.c \ + redirect.c request.c util.c stub.c sendfile.c +BINDIR?= ${PREFIX}/sbin +MAN= +LDADD= -lcrypt -# On Solaris, uncomment the following -# CPPFLAGS = -DHAVE_CRYPT_H -# LIBS = -lsocket -lnsl -lresolv - -# On Linux, uncomment the following -# CPPFLAGS = -DHAVE_CRYPT_H - -# For Linux or Solaris: -# To add support for large files (>2GB), uncomment the following. -# You do not need this for 64-bit executables. -# CPPFLAGS += -D_FILE_OFFSET_BITS=64 - -OBJS = base64.o cgi.o config.o core.o dump.o imap.o log.o main.o \ - redirect.o request.o util.o stub.o $(EXTRA_OBJS) -DEPENDS = mathopd.h Makefile - -# Uncomment the following if your system does not support the poll() function -# CPPFLAGS += -DPOLL_EMULATION -# EXTRA_OBJS += poll-emul.o - -# Uncomment the following if your system does not have the socklen_t type -# CPPFLAGS += -DNEED_SOCKLEN_T - -# Unomment the following if your system has a working vfork() function -# CPPFLAGS += -DHAVE_VFORK - -# Currently, sendfile support is available in two flavours: Linux and FreeBSD -# Uncomment one of the following two to enable sendfile() support -# CPPFLAGS += -DLINUX_SENDFILE -# CPPFLAGS += -DFREEBSD_SENDFILE -# If you define any of the SENDFILE conditionals, make sure to uncomment -# the next line as well. -# EXTRA_OBJS += sendfile.o - -all: $(BIN) -install: $(BIN) - install -c $(BIN) $(DESTDIR)$(SBINDIR) -$(BIN): $(OBJS) - $(CC) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS) -$(OBJS): $(DEPENDS) -.c.o: - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -clean: - rm -f $(BIN) $(OBJS) -.PHONY: install clean +.include