2 # OpenSSL/crypto/Makefile
8 INCLUDE
= -I.
-I
$(TOP
) -I..
/include -Iinclude
$(ZLIB_INCLUDE
)
9 # INCLUDES targets sudbirs!
10 INCLUDES
= -I..
-I..
/..
-I..
/modes
-I..
/include -I..
/..
/include $(ZLIB_INCLUDE
)
16 RECURSIVE_MAKE
= [ -n
"$(SDIRS)" ] && for i in
$(SDIRS
) ; do \
17 (cd
$$i && echo
"making $$target in $(DIR)/$$i..." && \
18 $(MAKE
) -e TOP
=..
/.. DIR
=$$i INCLUDES
='$(INCLUDES)' $$target ) || exit
1; \
24 CFLAGS
= $(INCLUDE
) $(CFLAG
) $(SHARED_CFLAG
)
25 ASFLAGS
= $(INCLUDE
) $(ASFLAG
)
32 GENERAL
=Makefile README crypto-lib.com
install.com
34 LIB
= $(TOP
)/libcrypto.a
35 SHARED_LIB
= libcrypto
$(SHLIB_EXT
)
36 LIBSRC
= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
37 ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
38 threads_pthread.c threads_win.c threads_none.c \
39 o_init.c o_fips.c mem_sec.c init.c
40 LIBOBJ
= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
41 ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
42 threads_pthread.o threads_win.o threads_none.o \
43 o_init.o o_fips.o mem_sec.o init.o
$(CPUID_OBJ
) $(UPLINK_OBJ
)
47 HEADER
= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
49 ALL
= $(GENERAL
) $(SRC
) $(HEADER
)
52 @
(cd ..
; $(MAKE
) DIRS
=$(DIR
) all)
56 fips
: cryptlib.o thr_id.o uid.o
$(CPUID_OBJ
)
57 [ -n
"$(SDIRS)" ] && for i in
$(SDIRS
) ; do \
58 ( obj
=`$(PERL) $(TOP)/util/fipsobj.pl $$i` && \
59 cd
$$i && echo
"making fips in $(DIR)/$$i..." && \
60 $(MAKE
) -e TOP
=..
/.. DIR
=$$i INCLUDES
='$(INCLUDES)' $$obj ) || exit
1; \
63 buildinf.h
: ..
/Makefile
64 $(PERL
) $(TOP
)/util
/mkbuildinf.pl
"$(CC) $(CFLAGS_Q)" "$(PLATFORM)" >buildinf.h
66 x86cpuid.s
: x86cpuid.pl perlasm
/x86asm.pl
67 $(PERL
) x86cpuid.pl
$(PERLASM_SCHEME
) $(CFLAGS
) $(PROCESSOR
) $@
69 applink.o
: $(TOP
)/ms
/applink.c
70 $(CC
) $(CFLAGS
) -c
-o
$@
$(TOP
)/ms
/applink.c
72 uplink.o
: $(TOP
)/ms
/uplink.c applink.o
73 $(CC
) $(CFLAGS
) -c
-o
$@
$(TOP
)/ms
/uplink.c
75 uplink-x86.s
: $(TOP
)/ms
/uplink-x86.pl
76 $(PERL
) $(TOP
)/ms
/uplink-x86.pl
$(PERLASM_SCHEME
) $@
78 x86_64cpuid.s
: x86_64cpuid.pl
; $(PERL
) x86_64cpuid.pl
$(PERLASM_SCHEME
) $@
79 ia64cpuid.s
: ia64cpuid.S
; $(CC
) $(CFLAGS
) -E ia64cpuid.S
> $@
80 ppccpuid.s
: ppccpuid.pl
; $(PERL
) ppccpuid.pl
$(PERLASM_SCHEME
) $@
81 pariscid.s
: pariscid.pl
; $(PERL
) pariscid.pl
$(PERLASM_SCHEME
) $@
82 alphacpuid.s
: alphacpuid.pl
83 (preproc
=$$$$.
$@.S
; trap
"rm $$preproc" INT
; \
84 $(PERL
) alphacpuid.pl
$$preproc && \
85 $(CC
) -E
-P
$$preproc > $@
&& rm $$preproc)
86 arm64cpuid.S
: arm64cpuid.pl
; $(PERL
) arm64cpuid.pl
$(PERLASM_SCHEME
) $@
87 armv4cpuid.S
: armv4cpuid.pl
; $(PERL
) armv4cpuid.pl
$(PERLASM_SCHEME
) $@
90 @target
=all; $(RECURSIVE_MAKE
)
93 $(PERL
) $(TOP
)/util
/files.pl
"CPUID_OBJ=$(CPUID_OBJ)" Makefile
>> $(TOP
)/MINFO
94 @target
=files
; $(RECURSIVE_MAKE
)
96 # lib: $(LIB): are splitted to avoid end-less loop
100 $(AR
) $(LIB
) $(LIBOBJ
)
101 $(RANLIB
) $(LIB
) || echo Never mind.
103 shared
: buildinf.h lib subdirs
104 if
[ -n
"$(SHARED_LIBS)" ]; then \
105 (cd ..
; $(MAKE
) $(SHARED_LIB
)); \
109 @target
=lib
; $(RECURSIVE_MAKE
)
112 @
[ -z
"$(THIS)" -o
-f buildinf.h
] || touch buildinf.h
# fake buildinf.h if it does not exist
113 @
[ -z
"$(THIS)" ] ||
$(TOP
)/util
/domd
$(CFLAG
) $(INCLUDE
) -- $(PROGS
) $(LIBSRC
)
114 @
[ -z
"$(THIS)" -o
-s buildinf.h
] ||
rm buildinf.h
115 @
[ -z
"$(THIS)" ] ||
(set
-e
; target
=depend
; $(RECURSIVE_MAKE
) )
116 @if
[ -z
"$(THIS)" ]; then
$(MAKE
) -f
$(TOP
)/Makefile reflect THIS
=$@
; fi
118 rm -f buildinf.h
*.s
*.o
*/*.o
*.obj lib
tags core .pure .nfs
* *.old
*.bak fluff
119 @target
=clean; $(RECURSIVE_MAKE
)
121 # DO NOT DELETE THIS LINE -- make depend depends on it.