123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #
- # 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
- MAKEDEPPROG= makedepend
- MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
- 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;
- PEX_LIBS=
- 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)" ] || $(MAKEDEPEND) -- $(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.
|