diff options
author | Marc-André Lemburg <mal@egenix.com> | 2002-04-04 16:15:41 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2002-04-04 16:15:41 (GMT) |
commit | 64b4f2770ef844714f063848a3078c979323c71c (patch) | |
tree | 2f68032a0f4080d465b2320569e5f153558adbba | |
parent | 47834463d0b6609986b291e3b1a085225118afd3 (diff) | |
download | cpython-64b4f2770ef844714f063848a3078c979323c71c.zip cpython-64b4f2770ef844714f063848a3078c979323c71c.tar.gz cpython-64b4f2770ef844714f063848a3078c979323c71c.tar.bz2 |
Updated freeze.py to the new Makefile symbol layout.
Fixed a few compiler warnings.
freeze.py now produces binaries which can import shared
modules (unlike before).
-rwxr-xr-x | Tools/freeze/freeze.py | 2 | ||||
-rw-r--r-- | Tools/freeze/makeconfig.py | 2 | ||||
-rw-r--r-- | Tools/freeze/makefreeze.py | 4 | ||||
-rw-r--r-- | Tools/freeze/makemakefile.py | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py index c347d53..0b9b206 100755 --- a/Tools/freeze/freeze.py +++ b/Tools/freeze/freeze.py @@ -464,7 +464,7 @@ def main(): somevars['CFLAGS'] = string.join(cflags) # override somevars['CPPFLAGS'] = string.join(cppflags) # override - files = ['$(OPT)', '$(LDFLAGS)', base_config_c, base_frozen_c] + \ + files = [base_config_c, base_frozen_c] + \ files + supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] diff --git a/Tools/freeze/makeconfig.py b/Tools/freeze/makeconfig.py index 687f271..2f04ac7 100644 --- a/Tools/freeze/makeconfig.py +++ b/Tools/freeze/makeconfig.py @@ -19,7 +19,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0): continue if with_ifdef: outfp.write("#ifndef init%s\n"%mod) - outfp.write('extern void init%s();\n' % mod) + outfp.write('extern void init%s(void);\n' % mod) if with_ifdef: outfp.write("#endif\n") elif m2 and m2.search(line): diff --git a/Tools/freeze/makefreeze.py b/Tools/freeze/makefreeze.py index ac59a9c..3888050 100644 --- a/Tools/freeze/makefreeze.py +++ b/Tools/freeze/makefreeze.py @@ -18,9 +18,7 @@ trailer = """\ # if __debug__ == 0 (i.e. -O option given), set Py_OptimizeFlag in frozen app. default_entry_point = """ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { extern int Py_FrozenMain(int, char **); """ + ((not __debug__ and """ diff --git a/Tools/freeze/makemakefile.py b/Tools/freeze/makemakefile.py index b1bad2b..e33e32e 100644 --- a/Tools/freeze/makemakefile.py +++ b/Tools/freeze/makemakefile.py @@ -24,7 +24,7 @@ def makemakefile(outfp, makevars, files, target): deps.append(dest) outfp.write("\n%s: %s\n" % (target, string.join(deps))) - outfp.write("\t$(CC) %s -o %s $(LDLAST)\n" % + outfp.write("\t$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" % (string.join(files), target)) outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target) |