Always build library object files with shared library cflags
[openssl.git] / crypto / Makefile.in
index 4d1eb75c61d1a85a7ba445fd5820b38b4514fe80..c8184e5a5c07d907d9c9af247fb64fdbfeb05e51 100644 (file)
@@ -9,8 +9,6 @@ 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
@@ -20,10 +18,10 @@ RECURSIVE_MAKE=     [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
                    $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
                done;
 
-PEX_LIBS=
+PLIB_LDFLAG=
 EX_LIBS=
-CFLAGS= $(INCLUDE) $(CFLAG)
+
+CFLAGS= $(INCLUDE) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDE) $(ASFLAG)
 AFLAGS=$(ASFLAGS)
 CPUID_OBJ=mem_clr.o
@@ -35,11 +33,11 @@ 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
+       ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
+       o_init.c o_fips.c mem_sec.c init.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)
+       ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
+       o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ)
 
 SRC= $(LIBSRC)
 
@@ -60,7 +58,7 @@ fips: cryptlib.o thr_id.o uid.o $(CPUID_OBJ)
                done;
 
 buildinf.h: ../Makefile
-       $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
+       $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS_Q)" "$(PLATFORM)" >buildinf.h
 
 x86cpuid.s:    x86cpuid.pl perlasm/x86asm.pl
        $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
@@ -107,28 +105,14 @@ shared: buildinf.h lib subdirs
 libs:
        @target=lib; $(RECURSIVE_MAKE)
 
-lint:
-       @target=lint; $(RECURSIVE_MAKE)
-
-update: local_depend
-       @[ -z "$(THIS)" ] || (set -e; target=update; $(RECURSIVE_MAKE) )
-       @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
-
-depend: local_depend
-       @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
-       @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
-local_depend:
+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)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) -- $(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)
 
-dclean:
-       $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
-       mv -f Makefile.new $(MAKEFILE)
-       @target=dclean; $(RECURSIVE_MAKE)
-
 # DO NOT DELETE THIS LINE -- make depend depends on it.