diff options
-rw-r--r-- | TODO.md | 1 | ||||
-rwxr-xr-x | tools/pngpal.py | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -24,4 +24,3 @@ # REVIEW -- embeded data: remove the environ symbol! diff --git a/tools/pngpal.py b/tools/pngpal.py index 7db451d..195fc91 100755 --- a/tools/pngpal.py +++ b/tools/pngpal.py @@ -8,6 +8,7 @@ from PIL import Image __version__ = "1.0" ld = os.environ.get("LD", "i586-pc-msdosdjgpp-ld") +strip = os.environ.get("STRIP", "i586-pc-msdosdjgpp-strip") def main(): @@ -40,6 +41,8 @@ def main(): with open(tmp, "wb") as fd: fd.write(bytearray(palette)) fd.flush() + + # create an object file from the binary rc = subprocess.call( [ ld, @@ -55,6 +58,11 @@ def main(): if rc != 0: parser.error("Failed to run %s" % ld) + # strip unwanted symbols + rc = subprocess.call([strip, "-w", "-K", "*_%s_*" % tmp, args.output]) + if rc != 0: + parser.error("Failed to run %s" % ld) + if __name__ == "__main__": main() |