Proper support for OpenBSD-i386 shared build, including assember modules!
[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 AFLAGS= $(ASFLAGS)
30
31 GENERAL=Makefile
32 TEST=casttest.c
33 APPS=
34
35 LIB=$(TOP)/libcrypto.a
36 LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c 
37 LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
38
39 SRC= $(LIBSRC)
40
41 EXHEADER= cast.h
42 HEADER= cast_s.h cast_lcl.h $(EXHEADER)
43
44 ALL=    $(GENERAL) $(SRC) $(HEADER)
45
46 top:
47         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49 all:    lib
50
51 lib:    $(LIBOBJ)
52         $(AR) $(LIB) $(LIBOBJ)
53         $(RANLIB) $(LIB) || echo Never mind.
54         @touch lib
55
56 # ELF
57 asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
58         (cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > ../$@)
59 # COFF
60 asm/cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
61         (cd asm; $(PERL) cast-586.pl coff $(CLAGS) $(PROCESSOR) > ../$@)
62 # a.out
63 cx86-out.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
64         (cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) > ../$@)
65
66 files:
67         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68
69 links:
70         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
71         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74
75 install:
76         @for i in $(EXHEADER) ; \
77         do  \
78         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
79         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
80         done;
81
82 tags:
83         ctags $(SRC)
84
85 tests:
86
87 lint:
88         lint -DLINT $(INCLUDES) $(SRC)>fluff
89
90 depend:
91         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
92
93 dclean:
94         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
95         mv -f Makefile.new $(MAKEFILE)
96
97 clean:
98         rm -f asm/cx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
99
100 # DO NOT DELETE THIS LINE -- make depend depends on it.
101
102 c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
103 c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
104 c_cfb64.o: c_cfb64.c cast_lcl.h
105 c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
106 c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
107 c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
108 c_enc.o: ../../e_os.h ../../include/openssl/cast.h
109 c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
110 c_enc.o: c_enc.c cast_lcl.h
111 c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
112 c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
113 c_ofb64.o: c_ofb64.c cast_lcl.h
114 c_skey.o: ../../e_os.h ../../include/openssl/cast.h
115 c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
116 c_skey.o: c_skey.c cast_lcl.h cast_s.h