• zhenwei pi's avatar
    Makefile: move SSL options into a block and refine rules · f74b0818
    zhenwei pi authored
    
    
    Move SSL options into two blocks to make it easy to read:
      1, first part: SSL variables part
      1, second part: SSL building rules part
    and change global rules to make it easy to maintain. For the further
    step, it gets extensible to add another type.
    
    New version of the library building rule:
    	static: $(STLIBNAME) $(SSL_STLIB)
    	dynamic: $(DYLIBNAME) $(SSL_DYLIB)
    
    Compare with the orignal version:
    	dynamic: $(DYLIBNAME)
    	static: $(STLIBNAME)
    	ifeq ($(USE_SSL),1)
    	dynamic: $(SSL_DYLIBNAME)
    	static: $(SSL_STLIBNAME)
    	endif
    
    If we want to add a new type(Ex, RDMA), for the new version, we can
    do like this:
    	########### RDMA variables start ###############
    	.....
    	########### RDMA variables end   ###############
    
    	static: $(STLIBNAME) $(SSL_STLIB) $(RDMA_STLIB)
    	dynamic: $(DYLIBNAME) $(SSL_DYLIB) $(RDMA_DYLIB)
    
    	########### RDMA building rules start ###############
    	.....
    	########### RDMA building rules end   ###############
    Signed-off-by: default avatarzhenwei pi <pizhenwei@bytedance.com>
    f74b0818
Makefile 12.1 KB