@ -213,11 +213,7 @@ endif
LDLIBS_SECURE += $( addprefix -l, $( LIBS_SECURE) )
i f n e q ( $( DEP_MISSING ) , )
NO_DEPS = true
e n d i f
i f n e q ( $( MAKECMDGOALS ) , c l e a n )
i f e q ( $( MAKECMDGOALS ) , c l e a n )
NO_DEPS = true
e n d i f
@ -300,7 +296,7 @@ third_party/openssl/libssl.a:
static : static_c static_cxx
static_c : dep_c \
static_c : \
% for lib in libs :
% if lib.build == 'all' and not lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .a\
@ -308,7 +304,7 @@ static_c: dep_c\
% e n d f o r
static_cxx : dep_cxx \
static_cxx : \
% for lib in libs :
% if lib.build == 'all' and lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .a\
@ -318,7 +314,7 @@ static_cxx: dep_cxx\
shared : shared_c shared_cxx
shared_c : dep_c \
shared_c : \
% for lib in libs :
% if lib.build == 'all' and not lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .$( SHARED_EXT) \
@ -326,7 +322,7 @@ shared_c: dep_c\
% e n d f o r
shared_cxx : dep_cxx \
shared_cxx : \
% for lib in libs :
% if lib.build == 'all' and lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .$( SHARED_EXT) \
@ -336,7 +332,7 @@ shared_cxx: dep_cxx\
privatelibs : privatelibs_c privatelibs_cxx
privatelibs_c : dep_c \
privatelibs_c : \
% for lib in libs :
% if lib.build == 'private' and not lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .a\
@ -344,7 +340,7 @@ privatelibs_c: dep_c\
% e n d f o r
privatelibs_cxx : dep_cxx \
privatelibs_cxx : \
% for lib in libs :
% if lib.build == 'private' and lib.get('c++', False) :
libs/$( CONFIG) /lib${ lib .name } .a\
@ -354,7 +350,7 @@ privatelibs_cxx: dep_cxx\
buildtests : buildtests_c buildtests_cxx
buildtests_c : bins_dep_c privatelibs_c \
buildtests_c : privatelibs_c \
% for tgt in targets :
% if tgt.build == 'test' and not tgt.get('c++', False) :
bins/$( CONFIG) /${ tgt .name } \
@ -362,7 +358,7 @@ buildtests_c: bins_dep_c privatelibs_c\
% e n d f o r
buildtests_cxx : bins_dep_cxx privatelibs_cxx \
buildtests_cxx : privatelibs_cxx \
% for tgt in targets :
% if tgt.build == 'test' and tgt.get('c++', False) :
bins/$( CONFIG) /${ tgt .name } \
@ -463,10 +459,6 @@ strip-shared_cxx: shared_cxx
% e n d f o r
% for p in protos :
deps/$(CONFIG)/gens/${p}.pb.dep :
$( Q) mkdir -p ` dirname $@ `
$( Q) touch $@
gens/${p}.pb.cc : ${p }.proto protoc_plugins
$( E) " [PROTOC] Generating protobuf CC file from $< "
$( Q) mkdir -p ` dirname $@ `
@ -474,68 +466,25 @@ gens/${p}.pb.cc: ${p}.proto protoc_plugins
% e n d f o r
deps/$(CONFIG)/%.dep : %.c
$( E) " [DEP] Generating dependencies for $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( CC) $( CFLAGS) $( CPPFLAGS_NO_ARCH) -MG -M $< > $@
deps/$(CONFIG)/%.dep : %.cc
$( E) " [DEP] Generating dependencies for $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( CXX) $( CXXFLAGS) $( CPPFLAGS_NO_ARCH) -MG -M $< > $@
objs/$(CONFIG)/%.o : %.c
$( E) " [C] Compiling $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( CC) $( CFLAGS) $( CPPFLAGS) -c -o $@ $<
$( Q) $( CC) $( CFLAGS) $( CPPFLAGS) -MMD -MF $( addsuffix .dep, $( basename $@ ) ) -c -o $@ $<
objs/$(CONFIG)/%.o : gens /%.pb .cc
$( E) " [CXX] Compiling $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( CXX) $( CXXFLAGS) $( CPPFLAGS) -c -o $@ $<
$( Q) $( CXX) $( CXXFLAGS) $( CPPFLAGS) -MMD -MF $( addsuffix .dep, $( basename $@ ) ) -c -o $@ $<
objs/$(CONFIG)/src/compiler/%.o : src /compiler /%.cc
$( E) " [HOSTCXX] Compiling $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( HOST_CXX) $( HOST_CXXFLAGS) $( HOST_CPPFLAGS) -c -o $@ $<
$( Q) $( HOST_CXX) $( HOST_CXXFLAGS) $( HOST_CPPFLAGS) -MMD -MF $( addsuffix .dep, $( basename $@ ) ) - c -o $@ $<
objs/$(CONFIG)/%.o : %.cc
$( E) " [CXX] Compiling $< "
$( Q) mkdir -p ` dirname $@ `
$( Q) $( CXX) $( CXXFLAGS) $( CPPFLAGS) -c -o $@ $<
dep : dep_c dep_cxx
dep_c : \
% for lib in libs :
% if not lib.get('c++', False) :
deps_lib${ lib .name } \
% e n d i f
% e n d f o r
bins_dep_c : \
% for tgt in targets :
% if not tgt.get('c++', False) :
deps_${ tgt .name } \
% e n d i f
% e n d f o r
dep_cxx : \
% for lib in libs :
% if lib.get('c++', False) :
deps_lib${ lib .name } \
% e n d i f
% e n d f o r
bins_dep_cxx : \
% for tgt in targets :
% if tgt.get('c++', False) :
deps_${ tgt .name } \
% e n d i f
% e n d f o r
$( Q) $( CXX) $( CXXFLAGS) $( CPPFLAGS) -MMD -MF $( addsuffix .dep, $( basename $@ ) ) -c -o $@ $<
install : install_c install_cxx
@ -625,7 +574,7 @@ endif
e n d i f
clean :
$( Q) $( RM) -rf deps objs libs bins gens
$( Q) $( RM) -rf objs libs bins gens
# The various libraries
@ -664,7 +613,7 @@ PUBLIC_HEADERS_C += \\
% e n d i f
LIB${lib.name.upper()}_OBJS = $( addprefix objs/$( CONFIG) /, $( addsuffix .o, $( basename $( LIB${ lib .name.upper() } _SRC) ) ) )
LIB${lib.name.upper()}_DEPS = $( addprefix dep s/$( CONFIG) /, $( addsuffix .dep, $( basename $( LIB${ lib .name.upper() } _SRC) ) ) )
LIB${lib.name.upper()}_DEPS = $( addprefix obj s/$( CONFIG) /, $( addsuffix .dep, $( basename $( LIB${ lib .name.upper() } _SRC) ) ) )
% if lib.get('secure', True) :
i f e q ( $( NO_SECURE ) , t r u e )
@ -775,13 +724,6 @@ objs/$(CONFIG)/${os.path.splitext(src)[0]}.o: \
% e n d i f
% e n d f o r
clean_lib${lib.name} :
$( E) " [CLEAN] Cleaning lib ${ lib .name } files "
$( Q) $( RM) $( LIB${ lib .name.upper() } _OBJS)
$( Q) $( RM) $( LIB${ lib .name.upper() } _DEPS)
$( Q) $( RM) libs/$( CONFIG) /lib${ lib .name } .a
$( Q) $( RM) libs/$( CONFIG) /lib${ lib .name } .$( SHARED_EXT)
< / % d e f >
< % d e f name = "maketarget(tgt)" >
@ -793,7 +735,7 @@ ${tgt.name.upper()}_SRC = \\
% e n d f o r
${tgt.name.upper()}_OBJS = $( addprefix objs/$( CONFIG) /, $( addsuffix .o, $( basename $( ${ tgt .name.upper() } _SRC) ) ) )
${tgt.name.upper()}_DEPS = $( addprefix dep s/$( CONFIG) /, $( addsuffix .dep, $( basename $( ${ tgt .name.upper() } _SRC) ) ) )
${tgt.name.upper()}_DEPS = $( addprefix obj s/$( CONFIG) /, $( addsuffix .dep, $( basename $( ${ tgt .name.upper() } _SRC) ) ) )
% if tgt.get('secure', True) :
i f e q ( $( NO_SECURE ) , t r u e )
@ -871,12 +813,6 @@ endif
% if tgt.get('secure', True) :
e n d i f
% e n d i f
clean_${tgt.name} :
$( E) " [CLEAN] Cleaning ${ tgt .name } files "
$( Q) $( RM) $( ${ tgt .name.upper() } _OBJS)
$( Q) $( RM) $( ${ tgt .name.upper() } _DEPS)
$( Q) $( RM) bins/$( CONFIG) /${ tgt .name }
< / % d e f >
.PHONY : all strip tools \
@ -890,12 +826,6 @@ install-static install-static_c install-static_cxx \
s t r i p s t r i p - s h a r e d s t r i p - s t a t i c \
s t r i p _ c s t r i p - s h a r e d _ c s t r i p - s t a t i c _ c \
s t r i p _ c x x s t r i p - s h a r e d _ c x x s t r i p - s t a t i c _ c x x \
c l e a n \
d e p _ c d e p _ c x x b i n s _ d e p _ c b i n s _ d e p _ c x x \
% for lib in libs :
deps_lib${ lib .name } clean_lib${ lib .name } \
% e n d f o r
% for tgt in targets :
deps_${ tgt .name } clean_${ tgt .name } \
% e n d f o r
c l e a n