Commit 64b4f277 authored by Marc-André Lemburg's avatar Marc-André Lemburg

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).
parent 47834463
......@@ -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)']
......
......@@ -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):
......
......@@ -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 """
......
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment