Proper support for OpenBSD-i386 shared build, including assember modules!
[openssl.git] / crypto / ripemd / Makefile.ssl
index 67d47ceb2c06cf2ebf7db51c81a88bee7f22d0c6..96ee1ca52dcb0403e7978b25e6b4d9ba790dd4cd 100644 (file)
@@ -8,19 +8,24 @@ CC=     cc
 CPP=    $(CC) -E
 INCLUDES=
 CFLAG=-g
+INSTALL_PREFIX=
+OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=/usr/local/ssl
 MAKE=           make -f Makefile.ssl
-MAKEDEPEND=     makedepend -f Makefile.ssl
+MAKEDEPPROG=   makedepend
+MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=       Makefile.ssl
 AR=             ar r
 
 RIP_ASM_OBJ=
 
 CFLAGS= $(INCLUDES) $(CFLAG)
+ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
 
 GENERAL=Makefile
 TEST=rmdtest.c
-APPS=rmd160.c
+APPS=
 
 LIB=$(TOP)/libcrypto.a
 LIBSRC=rmd_dgst.c rmd_one.c
@@ -40,45 +45,33 @@ all:    lib
 
 lib:    $(LIBOBJ)
        $(AR) $(LIB) $(LIBOBJ)
-       sh $(TOP)/util/ranlib.sh $(LIB)
+       $(RANLIB) $(LIB) || echo Never mind.
        @touch lib
 
-# elf
-asm/rm86-elf.o: asm/rm86unix.cpp
-       $(CPP) -DELF asm/rm86unix.cpp | as -o asm/rm86-elf.o
-
-# solaris
-asm/rm86-sol.o: asm/rm86unix.cpp
-       $(CC) -E -DSOL asm/rm86unix.cpp | sed 's/^#.*//' > asm/rm86-sol.s
-       as -o asm/rm86-sol.o asm/rm86-sol.s
-       rm -f asm/rm86-sol.s
-
+# ELF
+asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > ../$@)
+# COFF
+asm/rm86-cof.s: asm/rmd-586.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) rmd-586.pl coff $(CFLAGS) > ../$@)
 # a.out
-asm/rm86-out.o: asm/rm86unix.cpp
-       $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o
-
-# bsdi
-asm/rm86bsdi.o: asm/rm86unix.cpp
-       $(CPP) -DBSDI asm/rm86unix.cpp | as -o asm/rm86bsdi.o
-
-asm/rm86unix.cpp:
-       (cd asm; perl rmd-586.pl cpp >rm86unix.cpp)
+rm86-out.s: asm/rmd-586.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) > ../$@)
 
 files:
-       perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
+       $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
 
 links:
-       /bin/rm -f Makefile
-       $(TOP)/util/point.sh Makefile.ssl Makefile ;
-       $(TOP)/util/mklink.sh ../../include $(EXHEADER)
-       $(TOP)/util/mklink.sh ../../test $(TEST)
-       $(TOP)/util/mklink.sh ../../apps $(APPS)
+       @sh $(TOP)/util/point.sh Makefile.ssl Makefile
+       @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
+       @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
+       @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
 install:
        @for i in $(EXHEADER) ; \
        do  \
-       (cp $$i $(INSTALLTOP)/include/$$i; \
-       chmod 644 $(INSTALLTOP)/include/$$i ); \
+       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
        done;
 
 tags:
@@ -90,15 +83,22 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
-       $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
+       $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 
 dclean:
-       perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
+       $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
        mv -f Makefile.new $(MAKEFILE)
 
 clean:
-       /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
-
-errors:
+       rm -f asm/rm86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
+
+rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
+rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h
+rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h
+rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+rmd_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/ripemd.h
+rmd_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+rmd_one.o: ../../include/openssl/symhacks.h rmd_one.c