Commit 7abbffc3 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Further BUILDENV clean-up, 'make depend' is operational again.

parent 9dd84053
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -147,11 +147,12 @@ HEADER= e_os.h
all: Makefile build_all openssl.pc

BUILDENV=	PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
		SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}'	\
		LIBRPATH='$(INSTALLTOP)/lib'			\
		CC='${CC}' CFLAG='${CFLAG}' 			\
		AS='${CC}' ASFLAG='${CFLAG} -c'			\
		AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'	\
		SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/lib'		\
		INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'	\
		DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}'	\
		LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)"	\
		KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'	\
		EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'	\
@@ -164,7 +165,8 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
		RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'	\
		SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'			\
		MD5_ASM_OBJ='${MD5_ASM_OBJ}'			\
		RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'
		RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'		\
		THIS=$${THIS:-$@}

BUILD_CMD=if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
	if [ -d "$$dir" ]; then \
@@ -245,12 +247,10 @@ do_$(SHLIB_TARGET):
		if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
			libs="$(LIBKRB5) $$libs"; \
		fi; \
		$(MAKE) -f Makefile.shared \
			$(BUILDENV) \
		$(MAKE) -f Makefile.shared $(BUILDENV) \
			LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
			LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
			LIBDEPS="$$libs $(EX_LIBS)" \
			LIBRPATH="$(INSTALLTOP)/lib" \
			link_a.$(SHLIB_TARGET); \
		libs="-l$$i $$libs"; \
	done
@@ -350,7 +350,7 @@ depend:
	do \
	if [ -d "$$i" ]; then \
		(cd $$i && echo "making dependencies $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' CFLAG='-DOPENSSL_NO_DEPRECATED ${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
		$(MAKE) $(BUILDENV) CFLAG='-DOPENSSL_NO_DEPRECATED ${CFLAG}' depend ) || exit 1; \
	fi; \
	done;

@@ -450,7 +450,7 @@ install_sw:
	do \
	if [ -d "$$i" ]; then \
		(cd $$i; echo "installing $$i..."; \
		$(MAKE) $(BUILDENV) INSTALL_PREFIX='${INSTALL_PREFIX}' OPENSSLDIR='${OPENSSLDIR}' install ); \
		$(MAKE) $(BUILDENV) install ); \
	fi; \
	done
	@set -e; for i in $(LIBS) ;\
+10 −8
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ DIR= crypto
TOP=		..
CC=		cc
INCLUDE=	-I. -I$(TOP) -I../include
# INCLUDES targets sudbirs!
INCLUDES=	-I.. -I../.. -I../../include
CFLAG=		-g
MAKEDEPPROG=	makedepend
@@ -72,10 +73,10 @@ ia64cpuid.s: ia64cpuid.S
	$(CC) $(CFLAGS) -E ia64cpuid.S > $@

testapps:
	@if [ -z "(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
	[ -z "$(THIS)" ] || ( if echo ${SDIRS} | fgrep ' des '; \
	then cd des && $(MAKE) des; fi )
	[ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) testapps );
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi

subdirs:
	@for i in $(SDIRS) ;\
@@ -89,7 +90,7 @@ files:
	@for i in $(SDIRS) ;\
	do \
	(cd $$i && echo "making 'files' in crypto/$$i..." && \
	$(MAKE) PERL='${PERL}' files ); \
	$(MAKE) files ); \
	done;

links:
@@ -119,12 +120,12 @@ libs:
	done;

tests:
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@ fi
	@[ -z "$(THIS)" ] || (for i in $(SDIRS) ;\
	do \
	(cd $$i && echo "making tests in crypto/$$i..." && \
	$(MAKE) tests ); \
	done; )
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi

install:
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -147,14 +148,15 @@ lint:
	done;

depend:
	if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
	if [ ! -s buildinf.h ]; then rm buildinf.h; fi
	@for i in $(SDIRS) ;\
	[ -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)" ] || for i in $(SDIRS) ;\
	do \
	(cd $$i && echo "making depend in crypto/$$i..." && \
	$(MAKE) depend ); \
	$(MAKE) INCLUDES='${INCLUDES}' depend ); \
	done;
	@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