mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
python-3.6.zip added from Github
README.cosmo contains the necessary links.
This commit is contained in:
parent
75fc601ff5
commit
0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions
28
third_party/python/Tools/freeze/makemakefile.py
vendored
Normal file
28
third_party/python/Tools/freeze/makemakefile.py
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Write the actual Makefile.
|
||||
|
||||
import os
|
||||
|
||||
def makemakefile(outfp, makevars, files, target):
|
||||
outfp.write("# Makefile generated by freeze.py script\n\n")
|
||||
|
||||
keys = sorted(makevars.keys())
|
||||
for key in keys:
|
||||
outfp.write("%s=%s\n" % (key, makevars[key]))
|
||||
outfp.write("\nall: %s\n\n" % target)
|
||||
|
||||
deps = []
|
||||
for i in range(len(files)):
|
||||
file = files[i]
|
||||
if file[-2:] == '.c':
|
||||
base = os.path.basename(file)
|
||||
dest = base[:-2] + '.o'
|
||||
outfp.write("%s: %s\n" % (dest, file))
|
||||
outfp.write("\t$(CC) $(PY_CFLAGS) $(PY_CPPFLAGS) -c %s\n" % file)
|
||||
files[i] = dest
|
||||
deps.append(dest)
|
||||
|
||||
outfp.write("\n%s: %s\n" % (target, ' '.join(deps)))
|
||||
outfp.write("\t$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" %
|
||||
(' '.join(files), target))
|
||||
|
||||
outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target)
|
Loading…
Add table
Add a link
Reference in a new issue