somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override if sys.platform.startswith("darwin"): somevars['LDFLAGS'] += " -F$(PYTHONFRAMEWORKPREFIX)" somevars['LDFLAGS'] += " -mmacosx-version-min=%s" % somevars[ "MACOSX_DEPLOYMENT_TARGET"] somevars['LINKFORSHARED'] = "" #override files = ['$(OPT)', '$(LDFLAGS)', '$(LINKFORSHARED)', 'getpath.c'] + \ files + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)', '-lz'] # XXX zlib not always -lz outfp = bkfile.open('Makefile', 'w') try: makemakefile.writevars(outfp, somevars, string.join(targets)) makemakefile.writerules(outfp, files[:], '', '', targets[0]) makemakefile.writerules(outfp, files[:], '_d', '-D_DEBUG -DLAUNCH_DEBUG', targets[1]) finally: outfp.close() # Done! print 'Now run "make" to build the targets:', string.join(targets) def usage(msg): sys.stdout = sys.stderr print "Error:", msg print "Use ``%s -h'' for help" % sys.argv[0] sys.exit(2)
for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override if sys.platform.startswith("darwin"): somevars['LDFLAGS'] += " -F$(PYTHONFRAMEWORKPREFIX)" somevars['LDFLAGS'] += " -mmacosx-version-min=%s" % somevars["MACOSX_DEPLOYMENT_TARGET"] somevars['LINKFORSHARED'] = "" #override files = ['$(OPT)', '$(LDFLAGS)', '$(LINKFORSHARED)', 'getpath.c'] + \ files + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)', '-lz'] # XXX zlib not always -lz outfp = bkfile.open('Makefile', 'w') try: makemakefile.writevars(outfp, somevars, string.join(targets)) makemakefile.writerules(outfp, files[:], '', '', targets[0]) makemakefile.writerules(outfp, files[:], '_d', '-D_DEBUG -DLAUNCH_DEBUG', targets[1]) finally: outfp.close() # Done! print 'Now run "make" to build the targets:', string.join(targets) def usage(msg): sys.stdout = sys.stderr print "Error:", msg print "Use ``%s -h'' for help" % sys.argv[0] sys.exit(2)
flags_d = "-D_DEBUG -DLAUNCH_DEBUG" ldflagsw = "" ldflags_d = "" if sys.platform.startswith("darwin"): flagsw += " -I/Developer/Headers/FlatCarbon" ldflagsw += " -framework Carbon" flagsw_d = " ".join([flagsw, flags_d]) ldflagsw_d = " ".join([ldflagsw, ldflags_d]) ## outfp = bkfile.open("Makefile", "w") try: makemakefile.writevars(outfp, somevars, string.join(targets)) makemakefile.writerules(outfp, files[:], "", "", "", targets[0]) makemakefile.writerules(outfp, files[:], "_d", flags_d, ldflags_d, targets[1]) makemakefile.writerules(outfp, files[:], "w", flagsw, ldflagsw, targets[2]) makemakefile.writerules(outfp, files[:], "w_d", flagsw_d, ldflagsw_d, targets[3]) finally: outfp.close() # Done! print 'Now run "make" to build the targets:', string.join(targets) def usage(msg): sys.stdout = sys.stderr print "Error:", msg print "Use ``%s -h'' for help" % sys.argv[0]
flags_d = '-D_DEBUG -DLAUNCH_DEBUG' ldflagsw = '' ldflags_d = '' if sys.platform.startswith("darwin"): flagsw += " -I/Developer/Headers/FlatCarbon" ldflagsw += " -framework Carbon" flagsw_d = ' '.join([flagsw, flags_d]) ldflagsw_d = ' '.join([ldflagsw, ldflags_d]) ## outfp = bkfile.open('Makefile', 'w') try: makemakefile.writevars(outfp, somevars, string.join(targets)) makemakefile.writerules(outfp, files[:], '', '', '', targets[0]) makemakefile.writerules(outfp, files[:], '_d', flags_d, ldflags_d, targets[1]) makemakefile.writerules(outfp, files[:], 'w', flagsw, ldflagsw, targets[2]) makemakefile.writerules(outfp, files[:], 'w_d', flagsw_d, ldflagsw_d, targets[3]) finally: outfp.close() # Done! print 'Now run "make" to build the targets:', string.join(targets) def usage(msg):
flags_d = '-D_DEBUG -DLAUNCH_DEBUG' ldflagsw = '' ldflags_d = '' if sys.platform.startswith("darwin"): flagsw += " -I/Developer/Headers/FlatCarbon" ldflagsw += " -framework Carbon" flagsw_d = ' '.join([flagsw, flags_d]) ldflagsw_d = ' '.join([ldflagsw, ldflags_d]) ## outfp = bkfile.open('Makefile', 'w') try: makemakefile.writevars(outfp, somevars, string.join(targets)) makemakefile.writerules(outfp, files[:], '', '', '', targets[0]) makemakefile.writerules(outfp, files[:], '_d', flags_d, ldflags_d, targets[1]) makemakefile.writerules(outfp, files[:], 'w', flagsw, ldflagsw, targets[2]) makemakefile.writerules(outfp, files[:], 'w_d', flagsw_d, ldflagsw_d, targets[3]) finally: outfp.close() # Done! print 'Now run "make" to build the targets:', string.join(targets) def usage(msg): sys.stdout = sys.stderr print "Error:", msg print "Use ``%s -h'' for help" % sys.argv[0]