OpenBSD fix-up for new a.out targets. OpenBSD .s.o rule is busted...
[openssl.git] / crypto / cast / Makefile.ssl
1 #
2 # SSLeay/crypto/cast/Makefile
3 #
4
5 DIR=    cast
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=
10 CFLAG=-g
11 INSTALL_PREFIX=
12 OPENSSLDIR=     /usr/local/ssl
13 INSTALLTOP=/usr/local/ssl
14 MAKE=           make -f Makefile.ssl
15 MAKEDEPPROG=    makedepend
16 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17 MAKEFILE=       Makefile.ssl
18 AR=             ar r
19
20 CAST_ENC=c_enc.o
21 # or use
22 #CAST_ENC=asm/cx86-elf.o
23 #CAST_ENC=asm/cx86-out.o
24 #CAST_ENC=asm/cx86-sol.o
25 #CAST_ENC=asm/cx86bdsi.o
26
27 CFLAGS= $(INCLUDES) $(CFLAG)
28 ASFLAGS= $(INCLUDES) $(ASFLAG)
29
30 GENERAL=Makefile
31 TEST=casttest.c
32 APPS=
33
34 LIB=$(TOP)/libcrypto.a
35 LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c 
36 LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
37
38 SRC= $(LIBSRC)
39
40 EXHEADER= cast.h
41 HEADER= cast_s.h cast_lcl.h $(EXHEADER)
42
43 ALL=    $(GENERAL) $(SRC) $(HEADER)
44
45 top:
46         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
47
48 all:    lib
49
50 lib:    $(LIBOBJ)
51         $(AR) $(LIB) $(LIBOBJ)
52         $(RANLIB) $(LIB) || echo Never mind.
53         @touch lib
54
55 # ELF
56 asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
57         (cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > ../$@)
58 # COFF
59 asm/cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
60         (cd asm; $(PERL) cast-586.pl coff $(CLAGS) $(PROCESSOR) > ../$@)
61 # a.out
62 asm/cx86-out.o: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
63         (cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) | as -o ../$@)
64
65 files:
66         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
67
68 links:
69         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
70         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
71         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
72         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
73
74 install:
75         @for i in $(EXHEADER) ; \
76         do  \
77         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
78         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
79         done;
80
81 tags:
82         ctags $(SRC)
83
84 tests:
85
86 lint:
87         lint -DLINT $(INCLUDES) $(SRC)>fluff
88
89 depend:
90         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
91
92 dclean:
93         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
94         mv -f Makefile.new $(MAKEFILE)
95
96 clean:
97         rm -f asm/cx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
98
99 # DO NOT DELETE THIS LINE -- make depend depends on it.
100
101 c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
102 c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
103 c_cfb64.o: c_cfb64.c cast_lcl.h
104 c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
105 c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
106 c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
107 c_enc.o: ../../e_os.h ../../include/openssl/cast.h
108 c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
109 c_enc.o: c_enc.c cast_lcl.h
110 c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
111 c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
112 c_ofb64.o: c_ofb64.c cast_lcl.h
113 c_skey.o: ../../e_os.h ../../include/openssl/cast.h
114 c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
115 c_skey.o: c_skey.c cast_lcl.h cast_s.h