Unified - adapt the generation of modes assembler to use GENERATE
[openssl.git] / crypto / modes / Makefile.in
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) $(SHARED_CFLAG)
16 ASFLAGS= $(INCLUDES) $(ASFLAG)
17 AFLAGS= $(ASFLAGS)
18
19 GENERAL=Makefile
20
21 LIB=$(TOP)/libcrypto.a
22 LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
23         ccm128.c xts128.c wrap128.c ocb128.c
24 LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
25         ccm128.o xts128.o wrap128.o ocb128.o $(MODES_ASM_OBJ)
26
27 SRC= $(LIBSRC)
28
29 HEADER= modes_lcl.h
30
31 ALL=    $(GENERAL) $(SRC) $(HEADER)
32
33 top:
34         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
35
36 all:    lib
37
38 lib:    $(LIBOBJ)
39         $(AR) $(LIB) $(LIBOBJ)
40         $(RANLIB) $(LIB) || echo Never mind.
41         @touch lib
42
43 ghash-ia64.s:   asm/ghash-ia64.pl
44         $(PERL) asm/ghash-ia64.pl $(CFLAGS) $@
45 ghash-x86.s:    asm/ghash-x86.pl
46         $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
47 ghash-x86_64.s: asm/ghash-x86_64.pl
48         $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) $@
49 aesni-gcm-x86_64.s:     asm/aesni-gcm-x86_64.pl
50         $(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) $@
51 ghash-sparcv9.S:        asm/ghash-sparcv9.pl
52         $(PERL) asm/ghash-sparcv9.pl $(PERLASM_SCHEME) $@
53 ghash-alpha.s:  asm/ghash-alpha.pl
54         (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
55         $(PERL) asm/ghash-alpha.pl $$preproc && \
56         $(CC) -E -P $$preproc > $@ && rm $$preproc)
57 ghash-parisc.s: asm/ghash-parisc.pl
58         $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
59 ghashv8-armx.S: asm/ghashv8-armx.pl
60         $(PERL) asm/ghashv8-armx.pl $(PERLASM_SCHEME) $@
61 ghashp8-ppc.s:  asm/ghashp8-ppc.pl
62         $(PERL) asm/ghashp8-ppc.pl $(PERLASM_SCHEME) $@
63
64 # GNU make "catch all"
65 ghash-%.S:      asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
66
67 ghash-armv4.o:  ghash-armv4.S
68 ghashv8-armx.o: ghashv8-armx.S
69
70 files:
71         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
72
73 depend:
74         $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC)
75
76 clean:
77         rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
78
79 # DO NOT DELETE THIS LINE -- make depend depends on it.