Merge pull request #1403 from nicolasnoble/slimfast

Trimming down useless variables in the Makefile.
pull/1409/head
Craig Tiller 10 years ago
commit f894b1d26f
  1. 8570
      Makefile
  2. 35
      templates/Makefile.template

8570
Makefile

File diff suppressed because it is too large Load Diff

@ -1215,7 +1215,8 @@ $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o: ${' '.join(proto_to_cc(src2)
% endfor % endfor
</%def> </%def>
<%def name="maketarget(tgt)"> <%def name="maketarget(tgt)"><% has_no_sources = not tgt.src %>
% if not has_no_sources:
${tgt.name.upper()}_SRC = \\ ${tgt.name.upper()}_SRC = \\
% for src in tgt.src: % for src in tgt.src:
@ -1224,7 +1225,7 @@ ${tgt.name.upper()}_SRC = \\
% endfor % endfor
${tgt.name.upper()}_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(${tgt.name.upper()}_SRC)))) ${tgt.name.upper()}_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(${tgt.name.upper()}_SRC))))
% endif
% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': % if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check':
ifeq ($(NO_SECURE),true) ifeq ($(NO_SECURE),true)
@ -1254,9 +1255,15 @@ $(BINDIR)/$(CONFIG)/${tgt.name}: protobuf_dep_error
else else
$(BINDIR)/$(CONFIG)/${tgt.name}: $(PROTOBUF_DEP) $(${tgt.name.upper()}_OBJS)\ $(BINDIR)/$(CONFIG)/${tgt.name}: \
% if not has_no_sources:
$(PROTOBUF_DEP) $(${tgt.name.upper()}_OBJS)\
% endif
% else: % else:
$(BINDIR)/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\ $(BINDIR)/$(CONFIG)/${tgt.name}: \
% if not has_no_sources:
$(${tgt.name.upper()}_OBJS)\
% endif
% endif % endif
% for dep in tgt.deps: % for dep in tgt.deps:
$(LIBDIR)/$(CONFIG)/lib${dep}.a\ $(LIBDIR)/$(CONFIG)/lib${dep}.a\
@ -1267,17 +1274,26 @@ $(BINDIR)/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\
% if tgt.build == 'protoc': % if tgt.build == 'protoc':
$(E) "[HOSTLD] Linking $@" $(E) "[HOSTLD] Linking $@"
$(Q) mkdir -p `dirname $@` $(Q) mkdir -p `dirname $@`
$(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(${tgt.name.upper()}_OBJS)\ $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) \
% if not has_no_sources:
$(${tgt.name.upper()}_OBJS)\
% endif
% else: % else:
$(E) "[LD] Linking $@" $(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@` $(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(${tgt.name.upper()}_OBJS)\ $(Q) $(LDXX) $(LDFLAGS) \
% if not has_no_sources:
$(${tgt.name.upper()}_OBJS)\
% endif
% endif % endif
% else: % else:
## C-only targets specificities. ## C-only targets specificities.
$(E) "[LD] Linking $@" $(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@` $(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(${tgt.name.upper()}_OBJS)\ $(Q) $(LD) $(LDFLAGS) \
% if not has_no_sources:
$(${tgt.name.upper()}_OBJS)\
% endif
% endif % endif
% for dep in tgt.deps: % for dep in tgt.deps:
$(LIBDIR)/$(CONFIG)/lib${dep}.a\ $(LIBDIR)/$(CONFIG)/lib${dep}.a\
@ -1319,9 +1335,11 @@ $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o: \
% endfor % endfor
% endfor % endfor
% if not has_no_sources:
deps_${tgt.name}: $(${tgt.name.upper()}_OBJS:.o=.dep) deps_${tgt.name}: $(${tgt.name.upper()}_OBJS:.o=.dep)
% endif
% if not has_no_sources:
% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': % if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check':
ifneq ($(NO_SECURE),true) ifneq ($(NO_SECURE),true)
% endif % endif
@ -1331,6 +1349,7 @@ endif
% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': % if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check':
endif endif
% endif % endif
% endif
</%def> </%def>
ifneq ($(OPENSSL_DEP),) ifneq ($(OPENSSL_DEP),)

Loading…
Cancel
Save