1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/apps/public/mailx-12.5/Makefile
2024-07-22 01:58:46 -03:00

136 lines
4.2 KiB
Makefile
Executable File

#
# Makefile for mailx
#
#
# See the file INSTALL if you need help.
#
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
#SYSCONFDIR = /etc
SYSCONFDIR = /var/tmp/dconf
MAILRC = $(SYSCONFDIR)/nail.rc
MAILSPOOL = /var/mail
SENDMAIL = /usr/lib/sendmail
DESTDIR =
UCBINSTALL = /usr/ucb/install
# Define compiler, preprocessor, and linker flags here.
# Note that some Linux/glibc versions need -D_GNU_SOURCE in CPPFLAGS, or
# wcwidth() will not be available and multibyte characters will not be
# displayed correctly.
#CFLAGS = -g
#CPPFLAGS =
#LDFLAGS =
#WARN = -Wall -Wno-parentheses -Werror
WARN = -Werror=unused-function
# Some RedHat versions need INCLUDES = -I/usr/kerberos/include to compile
# with OpenSSL, or to compile with GSSAPI authentication included. In the
# latter case, they also need LDFLAGS = -L/usr/kerberos/lib.
#INCLUDES = -I/usr/kerberos/include
#LDFLAGS = -L/usr/kerberos/lib
# If you want to include SSL support using Mozilla NSS instead of OpenSSL,
# set something like the following paths. (You might also need to set LDFLAGS).
#MOZINC = /usr/include/mozilla-seamonkey-1.0.5
#INCLUDES = -I$(MOZINC)/nspr -I$(MOZINC)/nss
# These paths are suitable to activate NSS support on Solaris, provided that
# the packages SUNWmoznss, SUNWmoznss-devel, SUNWmoznspr, and SUNWmoznspr-devel
# are installed.
#MOZINC = /usr/sfw/include/mozilla
#MOZLIB = /usr/sfw/lib/mozilla
#INCLUDES = -I$(MOZINC)/nspr -I$(MOZINC)/nss
#LDFLAGS = -L$(MOZLIB) -R$(MOZLIB)
INCLUDES += -I$(OS_LIB_PATH)/include
LDFLAGS += -L$(OS_LIB_PATH)
INCLUDES += -I../openssl-0.9.8zh/include
LDFLAGS += -L../openssl-0.9.8zh/lib
INCLUDES += -I../../private/user/include
LIBS += -lpthread -lrt -los
SHELL = /bin/sh
#
# Binaries are stripped with this command after installation.
#
STRIP = strip
###########################################################################
###########################################################################
# You should really know what you do if you change anything below this line
###########################################################################
###########################################################################
FEATURES = -DMAILRC='"$(MAILRC)"' -DMAILSPOOL='"$(MAILSPOOL)"' \
-DSENDMAIL='"$(SENDMAIL)"' -D__LINUX_OS_FC__ -DINCLUDE_MAIL
OBJ = aux.o base64.o cmd3.o cmdtab.o collect.o \
fio.o getname.o getopt.o head.o hmac.o \
lex.o list.o \
maildir.o main.o md5.o mime.o names.o \
openssl.o popen.o \
sendout.o smtp.o ssl.o strings.o temp.o thread.o \
v7.local.o vars.o \
version.o
.SUFFIXES: .o .c .x
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURES) $(INCLUDES) $(WARN) -c $<
.c.x:
$(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURES) $(INCLUDES) $(WARN) -E $< >$@
.c:
$(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURES) $(INCLUDES) $(WARN) \
$(LDFLAGS) $< `grep '^[^#]' LIBS` $(LIBS) -o $@
all: mailx
mailx: $(OBJ) LIBS
$(CC) $(LDFLAGS) $(OBJ) `grep '^[^#]' LIBS` $(LIBS) -o mailx
$(OBJ): config.h def.h extern.h glob.h rcv.h
md5.o hmac.o smtp.o aux.o pop3.o junk.o: md5.h
config.h LIBS: makeconfig
$(SHELL) ./makeconfig
install: all
test -d $(DESTDIR)$(BINDIR) || mkdir -p $(DESTDIR)$(BINDIR)
$(UCBINSTALL) -c mailx $(DESTDIR)$(BINDIR)/mailx
$(STRIP) $(DESTDIR)$(BINDIR)/mailx
test -d $(DESTDIR)$(MANDIR)/man1 || mkdir -p $(DESTDIR)$(MANDIR)/man1
$(UCBINSTALL) -c -m 644 mailx.1 $(DESTDIR)$(MANDIR)/man1/mailx.1
test -d $(DESTDIR)$(SYSCONFDIR) || mkdir -p $(DESTDIR)$(SYSCONFDIR)
test -f $(DESTDIR)$(MAILRC) || \
$(UCBINSTALL) -c -m 644 nail.rc $(DESTDIR)$(MAILRC)
clean:
rm -f $(OBJ) mailx *~ core log
mrproper: clean
rm -f config.h config.log LIBS
PKGROOT = /var/tmp/mailx
PKGTEMP = /var/tmp
PKGPROTO = pkgproto
mailx.pkg: all
rm -rf $(PKGROOT)
mkdir -p $(PKGROOT)
$(MAKE) DESTDIR=$(PKGROOT) install
rm -f $(PKGPROTO)
echo 'i pkginfo' >$(PKGPROTO)
(cd $(PKGROOT) && find . -print | pkgproto) | >>$(PKGPROTO) sed 's:^\([df] [^ ]* [^ ]* [^ ]*\) .*:\1 root root:; s:^f\( [^ ]* etc/\):v \1:; s:^f\( [^ ]* var/\):v \1:; s:^\(s [^ ]* [^ ]*=\)\([^/]\):\1./\2:'
rm -rf $(PKGTEMP)/$@
pkgmk -a `uname -m` -d $(PKGTEMP) -r $(PKGROOT) -f $(PKGPROTO) $@
pkgtrans -o -s $(PKGTEMP) `pwd`/$@ $@
rm -rf $(PKGROOT) $(PKGPROTO) $(PKGTEMP)/$@