Some assembler-related clean-ups.
[openssl.git] / crypto / bf / Makefile.ssl
index 1a44992a1a76edd4445a3ca0d4cd690cec884e05..18bddda0db2372aa62673e4df56c989fee8e8698 100644 (file)
@@ -8,9 +8,11 @@ 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
+MAKEDEPEND=    $(TOP)/util/domd $(TOP)
 MAKEFILE=      Makefile.ssl
 AR=            ar r
 
@@ -25,8 +27,8 @@ TEST=bftest.c
 APPS=
 
 LIB=$(TOP)/libcrypto.a
-LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cbc.c bf_cfb64.c bf_ofb64.c 
-LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cbc.o bf_cfb64.o bf_ofb64.o
+LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
+LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
 
 SRC= $(LIBSRC)
 
@@ -42,47 +44,44 @@ all:        lib
 
 lib:   $(LIBOBJ)
        $(AR) $(LIB) $(LIBOBJ)
-       sh $(TOP)/util/ranlib.sh $(LIB)
+       $(RANLIB) $(LIB)
        @touch lib
 
 # elf
-asm/bx86-elf.o: asm/bx86-cpp.s asm/bx86unix.cpp
+asm/bx86-elf.o: asm/bx86unix.cpp
        $(CPP) -DELF asm/bx86unix.cpp | as -o asm/bx86-elf.o
 
 # solaris
-asm/bx86-sol.o: asm/bx86-cpp.s asm/bx86unix.cpp
+asm/bx86-sol.o: asm/bx86unix.cpp
        $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
        as -o asm/bx86-sol.o asm/bx86-sol.s
        rm -f asm/bx86-sol.s
 
 # a.out
-asm/bx86-out.o: asm/bx86-cpp.s asm/bx86unix.cpp
+asm/bx86-out.o: asm/bx86unix.cpp
        $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
 
 # bsdi
-asm/bx86bsdi.o: asm/bx86-cpp.s asm/bx86unix.cpp
-       $(CPP) -DBSDI asm/bx86unix.cpp | as -o asm/bx86bsdi.o
+asm/bx86bsdi.o: asm/bx86unix.cpp
+       $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
+
+asm/bx86unix.cpp:
+       (cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
 
 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/point.sh ../../doc/blowfish.doc blowfish.doc ;
-       $(TOP)/util/mklink.sh ../../include $(EXHEADER)
-       $(TOP)/util/mklink.sh ../../test $(TEST)
-       $(TOP)/util/mklink.sh ../../apps $(APPS)
-       /bin/rm -f asm/x86ms.pl asm/x86unix.pl
-       $(TOP)/util/point.sh ../../perlasm/x86ms.pl asm/x86ms.pl
-       $(TOP)/util/point.sh ../../perlasm/x86unix.pl asm/x86unix.pl
-
+       @$(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:
@@ -94,15 +93,24 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
-       $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
+       $(MAKEDEPEND) $(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/bx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
+
+bf_cfb64.o: ../../include/openssl/blowfish.h
+bf_cfb64.o: ../../include/openssl/opensslconf.h bf_locl.h
+bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
+bf_ecb.o: ../../include/openssl/opensslv.h bf_locl.h
+bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
+bf_enc.o: bf_locl.h
+bf_ofb64.o: ../../include/openssl/blowfish.h
+bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h
+bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
+bf_skey.o: bf_locl.h bf_pi.h