ref: 7d6035d5d4bfc8db4fb5d496ddfee85921178e04
parent: a8a2c36fbd68830f8853b0e00dbd7302bff359f0
parent: d78906aa21b53150790f70702d961f700d418e0d
author: Ethan Hugg <[email protected]>
date: Sun Jan 19 04:14:52 EST 2014
Merge pull request #164 from varunbpatil/mktargets_cleanup Cleanup mktargets.py
--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -27,7 +27,7 @@
dst = "$(%s_SRCDIR)/%%.o"%(PREFIX)
f.write("%s: %s\n"%(dst, src))
- f.write('\t$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(' + PREFIX + '_CFLAGS) $(' + PREFIX + '_INCLUDES) -c $(CXX_O) $<\n');
+ f.write('\t$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(' + PREFIX + '_CFLAGS) $(' + PREFIX + '_INCLUDES) -c $(CXX_O) $<\n')
f.write("\n")
def write_asm_rule_pattern(f):
@@ -35,7 +35,7 @@
dst = "$(%s_SRCDIR)/%%.o"%(PREFIX)
f.write("%s: %s\n"%(dst, src))
- f.write('\t$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(' + PREFIX + '_ASMFLAGS) $(' + PREFIX + '_ASM_INCLUDES) -o $@ $<\n');
+ f.write('\t$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(' + PREFIX + '_ASMFLAGS) $(' + PREFIX + '_ASM_INCLUDES) -o $@ $<\n')
f.write("\n")
@@ -86,7 +86,7 @@
f.write("%s_OBJS += $(%s_CPP_SRCS:%s=.o)\n"%(PREFIX, PREFIX, CPP_SUFFIX))
if len(asm) > 0:
- f.write("ifeq ($(USE_ASM), Yes)\n");
+ f.write("ifeq ($(USE_ASM), Yes)\n")
f.write("%s_ASM_SRCS=\\\n"%(PREFIX))
for c in asm:
f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
@@ -102,15 +102,17 @@
write_asm_rule_pattern(f)
if args.library is not None:
- f.write("$(LIBPREFIX)%s.$(LIBSUFFIX): $(%s_OBJS)\n"%(args.library, PREFIX));
+ f.write("$(LIBPREFIX)%s.$(LIBSUFFIX): $(%s_OBJS)\n"%(args.library, PREFIX))
f.write("\trm -f $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
- f.write("\t$(AR) $(AR_OPTS) $(%s_OBJS)\n"%PREFIX);
- f.write("\n");
- f.write("libraries: $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library);
- f.write("LIBRARIES += $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library);
+ f.write("\t$(AR) $(AR_OPTS) $(%s_OBJS)\n"%PREFIX)
+ f.write("\n")
+ f.write("libraries: $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
+ f.write("LIBRARIES += $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
if args.binary is not None:
f.write("%s: $(%s_OBJS) $(LIBS) $(%s_LIBS) $(%s_DEPS)\n"%(args.binary, PREFIX, PREFIX, PREFIX))
f.write("\t$(CXX) $(CXX_LINK_O) $(%s_OBJS) $(%s_LDFLAGS) $(%s_LIBS) $(LDFLAGS) $(LIBS)\n\n"%(PREFIX, PREFIX, PREFIX))
- f.write("binaries: %s\n"%args.binary);
- f.write("BINARIES += %s\n"%args.binary);
+ f.write("binaries: %s\n"%args.binary)
+ f.write("BINARIES += %s\n"%args.binary)
+
+f.close()