mirror of
https://github.com/openssl/openssl.git
synced 2024-12-27 02:43:41 +08:00
ced2c2c598
Reviewed-by: Richard Levitte <levitte@openssl.org>
119 lines
3.6 KiB
Makefile
119 lines
3.6 KiB
Makefile
#
|
|
# OpenSSL/crypto/Makefile
|
|
#
|
|
|
|
DIR= crypto
|
|
TOP= ..
|
|
CC= cc
|
|
INCLUDE= -I. -I$(TOP) -I../include -Iinclude $(ZLIB_INCLUDE)
|
|
# INCLUDES targets sudbirs!
|
|
INCLUDES= -I.. -I../.. -I../modes -I../include -I../../include $(ZLIB_INCLUDE)
|
|
CFLAG= -g
|
|
MAKEFILE= Makefile
|
|
RM= rm -f
|
|
AR= ar r
|
|
|
|
RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
|
|
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
|
|
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
|
|
done;
|
|
|
|
LDFLAGS=
|
|
EX_LIBS=
|
|
|
|
CFLAGS= $(INCLUDE) $(CFLAG)
|
|
ASFLAGS= $(INCLUDE) $(ASFLAG)
|
|
AFLAGS=$(ASFLAGS)
|
|
CPUID_OBJ=mem_clr.o
|
|
|
|
LIBS=
|
|
|
|
GENERAL=Makefile README crypto-lib.com install.com
|
|
|
|
LIB= $(TOP)/libcrypto.a
|
|
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
|
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
|
ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c fips_ers.c \
|
|
o_init.c o_fips.c mem_sec.c
|
|
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
|
|
ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o fips_ers.o \
|
|
o_init.o o_fips.o mem_sec.o $(CPUID_OBJ)
|
|
|
|
SRC= $(LIBSRC)
|
|
|
|
HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
|
|
|
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
|
|
|
top:
|
|
@(cd ..; $(MAKE) DIRS=$(DIR) all)
|
|
|
|
all: shared
|
|
|
|
fips: cryptlib.o thr_id.o uid.o $(CPUID_OBJ)
|
|
[ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
|
|
( obj=`$(PERL) $(TOP)/util/fipsobj.pl $$i` && \
|
|
cd $$i && echo "making fips in $(DIR)/$$i..." && \
|
|
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$obj ) || exit 1; \
|
|
done;
|
|
|
|
buildinf.h: ../Makefile
|
|
$(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
|
|
|
|
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
|
|
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
|
|
|
applink.o: $(TOP)/ms/applink.c
|
|
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
|
|
|
|
uplink.o: $(TOP)/ms/uplink.c applink.o
|
|
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
|
|
|
|
uplink-x86.s: $(TOP)/ms/uplink-x86.pl
|
|
$(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
|
|
|
|
x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
|
ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
|
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
|
|
pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
|
|
alphacpuid.s: alphacpuid.pl
|
|
(preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
|
|
$(PERL) alphacpuid.pl > $$preproc && \
|
|
$(CC) -E -P $$preproc > $@ && rm $$preproc)
|
|
arm64cpuid.S: arm64cpuid.pl; $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@
|
|
armv4cpuid.S: armv4cpuid.pl; $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) > $@
|
|
|
|
subdirs:
|
|
@target=all; $(RECURSIVE_MAKE)
|
|
|
|
files:
|
|
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
|
|
@target=files; $(RECURSIVE_MAKE)
|
|
|
|
# lib: $(LIB): are splitted to avoid end-less loop
|
|
lib: $(LIB)
|
|
@touch lib
|
|
$(LIB): $(LIBOBJ)
|
|
$(AR) $(LIB) $(LIBOBJ)
|
|
$(RANLIB) $(LIB) || echo Never mind.
|
|
|
|
shared: buildinf.h lib subdirs
|
|
if [ -n "$(SHARED_LIBS)" ]; then \
|
|
(cd ..; $(MAKE) $(SHARED_LIB)); \
|
|
fi
|
|
|
|
libs:
|
|
@target=lib; $(RECURSIVE_MAKE)
|
|
|
|
depend:
|
|
@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
|
|
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
|
@[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
|
|
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
|
|
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
|
clean:
|
|
rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
|
@target=clean; $(RECURSIVE_MAKE)
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|