121 lines
3.4 KiB
Plaintext
121 lines
3.4 KiB
Plaintext
$OpenBSD: patch-src_osdep_unix_Makefile,v 1.13 2004/07/18 22:30:19 jakob Exp $
|
|
--- src/osdep/unix/Makefile.orig Thu Apr 29 23:10:25 2004
|
|
+++ src/osdep/unix/Makefile Wed Jul 7 17:49:39 2004
|
|
@@ -24,13 +24,13 @@ EXTRAAUTHENTICATORS=
|
|
EXTRADRIVERS=mbox
|
|
PASSWDTYPE=std
|
|
SSLTYPE=nopwd
|
|
-IP=4
|
|
+IP=6
|
|
|
|
|
|
# Extended flags needed for SSL. You may need to modify.
|
|
|
|
-SSLDIR=/usr/local/ssl
|
|
-SSLCERTS=$(SSLDIR)/certs
|
|
+SSLDIR=/usr
|
|
+SSLCERTS=/etc/ssl
|
|
SSLKEYS=$(SSLCERTS)
|
|
SSLINCLUDE=$(SSLDIR)/include
|
|
SSLLIB=$(SSLDIR)/lib
|
|
@@ -109,6 +109,7 @@ RANLIB=ranlib
|
|
DEFAULTAUTHENTICATORS=md5 pla log
|
|
DEFAULTDRIVERS=imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile
|
|
|
|
+.SUFFIXES: .o .so
|
|
|
|
# Normally no need to change any of these
|
|
|
|
@@ -117,6 +118,7 @@ BINARIES=osdep.o mail.o misc.o newsrc.o
|
|
dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
|
|
rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
|
|
unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
|
|
+SOBINARIES=$(BINARIES:.o=.so)
|
|
CFLAGS=-g
|
|
|
|
CAT=cat
|
|
@@ -125,6 +127,11 @@ MV=mv
|
|
RM=rm -rf
|
|
SH=sh
|
|
|
|
+.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc"
|
|
+PICFLAG= -fPIC
|
|
+.else
|
|
+PICFLAG= -fpic
|
|
+.endif
|
|
|
|
# Primary build command
|
|
|
|
@@ -236,7 +243,7 @@ bso: # OpenBSD
|
|
SPOOLDIR=/var \
|
|
ACTIVEFILE=/usr/local/news/lib/active \
|
|
RSHPATH=/usr/bin/rsh \
|
|
- BASECFLAGS="-O2 -pipe"
|
|
+ BASECFLAGS="-pipe"
|
|
|
|
cvx: # Convex
|
|
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
|
|
@@ -786,23 +793,32 @@ vu2: # VAX Ultrix 2.3, etc.
|
|
|
|
# Build it!
|
|
|
|
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
|
|
build: clean once $(ARCHIVE)
|
|
-
|
|
all: $(ARCHIVE)
|
|
+.else
|
|
+build: clean once $(ARCHIVE) $(SHLIB)
|
|
+all: $(ARCHIVE) $(SHLIB)
|
|
+.endif
|
|
|
|
$(ARCHIVE): $(BINARIES)
|
|
sh -c '$(RM) $(ARCHIVE) || true'
|
|
@$(CAT) ARCHIVE
|
|
@$(SH) ARCHIVE
|
|
|
|
+$(SHLIB): $(SOBINARIES)
|
|
+ $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SOBINARIES)
|
|
+
|
|
.c.o:
|
|
`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
|
|
|
|
+.c.so:
|
|
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $(PICFLAG) -DPIC $(@:.so=.c) -o $@
|
|
|
|
# Cleanup
|
|
|
|
clean:
|
|
- sh -c '$(RM) auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
|
|
+ sh -c '$(RM) auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o *.so ARCHIVE *FLAGS *TYPE $(ARCHIVE) $(SHLIB) || true'
|
|
|
|
|
|
# Dependencies
|
|
@@ -835,7 +851,7 @@ utf8.o: mail.h misc.h osdep.h utf8.h
|
|
|
|
# OS-dependent
|
|
|
|
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
|
|
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
|
|
osdep.h env_unix.h tcp_unix.h \
|
|
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
|
|
auths.c crexcl.c flocksim.c nfstest.c flcksafe.c fsync.c gethstid.c \
|
|
@@ -848,12 +864,12 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
|
|
write.c sslstdio.c \
|
|
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
|
|
OSCFLAGS
|
|
- @echo Building OS-dependent module
|
|
- @echo If you get No such file error messages for files x509.h, ssl.h,
|
|
- @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
|
|
- @echo is not installed on your system. Either install OpenSSL first
|
|
- @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
|
|
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
|
|
+
|
|
+osdep.o: $(OSDEPS)
|
|
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` osdep.c
|
|
+
|
|
+osdep.so: $(OSDEPS)
|
|
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` $(PICFLAG) -DPIC osdep.c -o $@
|
|
|
|
osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
|
|
$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
|