diff options
| author | Guido van Rossum <guido@python.org> | 1997-08-14 01:45:33 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-08-14 01:45:33 +0000 |
| commit | 58a594829c116ef118ff47a7c4079a9efd1dad03 (patch) | |
| tree | 8e0abdb8e128b0e0469381176d05f30fcbfda61f /Tools/freeze/winmakemakefile.py | |
| parent | 41b9f00e8f314825a23f635308158cc1488b5c86 (diff) | |
| download | cpython-git-58a594829c116ef118ff47a7c4079a9efd1dad03.tar.gz | |
Changes for building under windows.
Diffstat (limited to 'Tools/freeze/winmakemakefile.py')
| -rw-r--r-- | Tools/freeze/winmakemakefile.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Tools/freeze/winmakemakefile.py b/Tools/freeze/winmakemakefile.py new file mode 100644 index 0000000000..66c33e8331 --- /dev/null +++ b/Tools/freeze/winmakemakefile.py @@ -0,0 +1,45 @@ +import sys, os, string + +def makemakefile(outfp, vars, files, target): + save = sys.stdout + try: + sys.stdout = outfp + realwork(vars, files, target) + finally: + sys.stdout = save + +def realwork(vars, files, target): + print "# Makefile for Windows (NT or 95) generated by freeze.py script" + print + print "target =", target + print "pythonhome =", vars['prefix'] + print "pythonlib =", vars['exec_prefix'] + "/pcbuild/release/python15.lib" + print "subsystem =", vars['subsystem'] + print + print "all: $(target).exe" + print + + objects = [] + for file in files: + base = os.path.basename(file) + base, ext = os.path.splitext(base) + objects.append(base + ".obj") + print "%s.obj: %s" % (base, file) + print "\t$(CC) -c $(cdl)", + print "-I$(pythonhome)/Include -I$(pythonhome)/PC \\" + print "\t\t$(cflags) $(cdebug) $(cinclude) \\" + print "\t\t", file + print + + print "$(target).exe:", + for obj in objects: print obj, + print + print "\tlink -out:$(target).exe", + for obj in objects: print obj, + print "\\" + print "\t\t$(pythonlib) $(lcustom) shell32.lib comdlg32.lib wsock32.lib \\" + print "\t\t-subsystem:$(subsystem) $(resources)" + +# Local Variables: +# indent-tabs-mode: nil +# End: |
