ea74c5cad2a60e51176624287c5e60054dad618b
[openssl.git] / crypto / modes / Makefile
1 #
2 # OpenSSL/crypto/modes/Makefile
3 #
4
5 DIR=    modes
6 TOP=    ../..
7 CC=     cc
8 INCLUDES= -I.. -I$(TOP) -I../../include
9 CFLAG=-g
10 MAKEFILE=       Makefile
11 AR=             ar r
12
13 MODES_ASM_OBJ=
14
15 CFLAGS= $(INCLUDES) $(CFLAG)
16 ASFLAGS= $(INCLUDES) $(ASFLAG)
17 AFLAGS= $(ASFLAGS)
18
19 GENERAL=Makefile
20 TEST=
21 APPS=
22
23 LIB=$(TOP)/libcrypto.a
24 LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c
25 LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
26         $(MODES_ASM_OBJ)
27
28 SRC= $(LIBSRC)
29
30 #EXHEADER= store.h str_compat.h
31 EXHEADER= modes.h
32 HEADER= $(EXHEADER)
33
34 ALL=    $(GENERAL) $(SRC) $(HEADER)
35
36 top:
37         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
38
39 all:    lib
40
41 lib:    $(LIBOBJ)
42         $(AR) $(LIB) $(LIBOBJ)
43         $(RANLIB) $(LIB) || echo Never mind.
44         @touch lib
45
46 aes-ia64.s:     asm/ghash-ia64.pl
47         $(PERL) asm/ghash-ia64.pl $@ $(CFLAGS)
48 ghash-x86.s:    asm/ghash-x86.pl
49         $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
50 ghash-x86_64.s: asm/ghash-x86_64.pl
51         $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
52 ghash-sparcv9.s:        asm/ghash-sparcv9.pl
53         $(PERL) asm/ghash-sparcv8.pl $(CFLAGS) > $@
54 ghash-alpha.s:  asm/ghash-alpha.pl
55         $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
56 # GNU make "catch all"
57 ghash-%.s:      asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $(CFLAGS) > $@
58
59 files:
60         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
61
62 links:
63         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
64         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
65         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
66
67 install:
68         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
69         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
70         do  \
71         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
72         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
73         done;
74
75 tags:
76         ctags $(SRC)
77
78 tests:
79
80 lint:
81         lint -DLINT $(INCLUDES) $(SRC)>fluff
82
83 depend:
84         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
85         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
86
87 dclean:
88         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
89         mv -f Makefile.new $(MAKEFILE)
90
91 clean:
92         rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
93
94 # DO NOT DELETE THIS LINE -- make depend depends on it.
95
96 cbc128.o: cbc128.c modes.h
97 cfb128.o: cfb128.c modes.h
98 ctr128.o: ctr128.c modes.h
99 cts128.o: cts128.c modes.h
100 ofb128.o: modes.h ofb128.c