Avoid case in ca.c fix.
[openssl.git] / crypto / rc4 / Makefile
index 91fb3ac8031338dcedde0d156f3f6e28725c9ac6..b3d4aa418c231e8f6f7c5700ef29a7c9a59e426d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# SSLeay/crypto/rc4/Makefile
+# OpenSSL/crypto/rc4/Makefile
 #
 
 DIR=   rc4
@@ -8,16 +8,9 @@ CC=    cc
 CPP=    $(CC) -E
 INCLUDES=
 CFLAG=-g
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-MAKE=          make
-MAKEDEPPROG=   makedepend
-MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
-MAKEFILE=      Makefile
 AR=            ar r
 
-RC4_ENC=rc4_enc.o
+RC4_ENC=rc4_enc.o rc4_skey.o
 
 CFLAGS= $(INCLUDES) $(CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
@@ -29,7 +22,7 @@ APPS=
 
 LIB=$(TOP)/libcrypto.a
 LIBSRC=rc4_skey.c rc4_enc.c
-LIBOBJ=rc4_skey.o $(RC4_ENC)
+LIBOBJ=$(RC4_ENC)
 
 SRC= $(LIBSRC)
 
@@ -48,20 +41,20 @@ lib:        $(LIBOBJ)
        $(RANLIB) $(LIB) || echo Never mind.
        @touch lib
 
-# ELF
-rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
-# COFF
-rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
-# a.out
-rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
+rc4-586.s:     asm/rc4-586.pl ../perlasm/x86asm.pl
+       $(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
 
-rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) $< $@
+rc4-x86_64.s: asm/rc4-x86_64.pl;       $(PERL) asm/rc4-x86_64.pl $@
 
-rc4-ia64.s: asm/rc4-ia64.S
-       $(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@
+rc4-ia64.S: asm/rc4-ia64.pl
+       $(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@
+
+rc4-ia64.s: rc4-ia64.S
+       @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
+       int)    set -x; $(CC) $(CFLAGS) -DSZ=4 -E rc4-ia64.S > $@ ;; \
+       char)   set -x; $(CC) $(CFLAGS) -DSZ=1 -E rc4-ia64.S > $@ ;; \
+       *)      exit 1 ;; \
+       esac
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -72,6 +65,7 @@ links:
        @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
 install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
        do  \
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
@@ -87,6 +81,7 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
+       @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
        $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 
 dclean: