net-snmp sun mods install: make sure destdirs exist
[unleashed-userland.git] / components / uwimap / patches / imap-2007e-shared.patch
blob23c083bd4a35f1cf79ea1f3d2adbb50b84c98731
1 diff -up imap-2007e/src/osdep/unix/Makefile.shared imap-2007e/src/osdep/unix/Makefile
2 --- imap-2007e/src/osdep/unix/Makefile.shared 2009-07-07 19:28:02.909755512 -0500
3 +++ imap-2007e/src/osdep/unix/Makefile 2009-07-07 19:29:35.870006799 -0500
4 @@ -170,6 +170,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
5 EXTRADRIVERS='$(EXTRADRIVERS)' EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
6 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
8 +# Need this for the shared library rule to work correctly
9 +.SUFFIXES: .o .so
10 +SOFILES=${BINARIES:.o=.so}
13 # Here if no make argument established
15 @@ -845,18 +849,24 @@ vu2: # VAX Ultrix 2.3, etc.
17 # Build it!
19 -build: clean once $(ARCHIVE)
20 +build: clean once $(ARCHIVE) $(SHLIBNAME)
22 -all: $(ARCHIVE)
23 +all: $(ARCHIVE) $(SHLIBNAME)
25 $(ARCHIVE): $(BINARIES)
26 sh -c '$(RM) $(ARCHIVE) || true'
27 @$(CAT) ARCHIVE
28 @$(SH) ARCHIVE
30 -.c.o:
31 - `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
32 +$(SHLIBNAME): $(SOFILES)
33 + gcc -shared -Wl,-h,$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS` `cat CFLAGS`
34 + ln -s $(SHLIBNAME) lib$(SHLIBBASE).so
36 +.c.so: osdep.h
37 + $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` ${@:.so=.c} -o $@
39 +.c.o:
40 + $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` $*.c
42 # Cleanup
44 @@ -895,8 +905,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
47 # OS-dependent
49 -osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
50 +OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
51 osdep.h env_unix.h tcp_unix.h \
52 osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
53 auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
54 @@ -910,12 +919,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
55 write.c sslstdio.c \
56 strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
57 OSCFLAGS
59 +osdep.o: $(OSDEPS)
60 + $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
61 + @echo ========================================================================
62 @echo Building OS-dependent module
63 @echo If you get No such file error messages for files x509.h, ssl.h,
64 @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
65 @echo is not installed on your system. Either install OpenSSL first
66 @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
67 - `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
68 + @echo ========================================================================
70 +osdep.so: $(OSDEPS)
71 + $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `cat OSCFLAGS` -c osdep.c -o $@
73 osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
74 $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c