{"id":35093815,"url":"https://github.com/siffiejoe/prg-amalgc","last_synced_at":"2026-04-25T13:33:51.562Z","repository":{"id":12364731,"uuid":"15014355","full_name":"siffiejoe/prg-amalgc","owner":"siffiejoe","description":"Amalgamation of C projects","archived":false,"fork":false,"pushed_at":"2013-12-30T20:07:11.000Z","size":136,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-29T07:20:53.466Z","etag":null,"topics":["amalgamation","c"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siffiejoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-07T22:48:19.000Z","updated_at":"2022-06-16T00:46:12.000Z","dependencies_parsed_at":"2022-09-23T05:50:14.869Z","dependency_job_id":null,"html_url":"https://github.com/siffiejoe/prg-amalgc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siffiejoe/prg-amalgc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Fprg-amalgc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Fprg-amalgc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Fprg-amalgc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Fprg-amalgc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siffiejoe","download_url":"https://codeload.github.com/siffiejoe/prg-amalgc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Fprg-amalgc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32264427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amalgamation","c"],"created_at":"2025-12-27T15:03:09.864Z","updated_at":"2026-04-25T13:33:51.542Z","avatar_url":"https://github.com/siffiejoe.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"#                             prg-amalgc                             #\n\nA perl script that creates a single C source file containing all files\nthat are `#include`d via C preprocessor directives.\n\nE.g. SQLite uses an [amalgamated source file][1] for easier\ndistribution and more effective optimization.\n\n  [1]: http://www.sqlite.org/amalgamation.html\n\nRun `amalgc --help` for usage information.\n\n\n##                              Example                             ##\n\nThere has been interest in the Lua mailing list about a version of\n[Lua][2], which is distributed as a single C source file. LHF, one\nof Lua's creators, posted a [file][3] that can be used to create such\nan amalgamated source file.\n\n1. Download the referenced file as `one.c` and put it into the `src`\n   directory of Lua's source code.\n2. Run `amalgc -i . -l -o amalglua.c one.c` to create a file\n   `amalglua.c` which includes all the sources for the Lua library,\n   the standalone interpreter, and the `luac` bytecode compiler.\n3. Use the appropriate compiler incantation to compile the file. (E.g.\n   to compile the standalone interpreter on my Linux box I use):\n\n```\ngcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -o amalglua amalglua.c -Wl,-E -lm -ldl -lreadline\n```\n\n  [2]: http://www.lua.org/\n  [3]: http://lua-users.org/lists/lua-l/2011-12/msg00249.html\n\n\n##                              Caveats                             ##\n\nThe heuristic used to create the amalgamated source file is not\nperfect. In particular, it will fail for conditional inclusion of\nsource files, like e.g.:\n\n```C\n#ifdef SOME_DEFINE\n#include \"file.h\"\n#endif\n\n/* ... */\n\n#include \"file.h\"\n```\n\nThe first `#include` will be replaced by the file contents, the second\nwill just be ignored, so the resulting source file will only compile\nif `SOME_DEFINE` is `#define`d.\n\n\n##                              License                             ##\n\n    Copyright (C) 2011  Philipp Janda\n    \n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License (see\n    below), or (at your option) any later version.\n    \n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiffiejoe%2Fprg-amalgc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiffiejoe%2Fprg-amalgc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiffiejoe%2Fprg-amalgc/lists"}