{"id":21354691,"url":"https://github.com/iveevi/smake","last_synced_at":"2026-03-06T01:02:27.301Z","repository":{"id":57468497,"uuid":"435329207","full_name":"iveevi/smake","owner":"iveevi","description":"A simple and convenient build-and-run system for C and C++.","archived":false,"fork":false,"pushed_at":"2022-12-12T05:26:04.000Z","size":943,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v1","last_synced_at":"2026-01-05T07:23:17.464Z","etag":null,"topics":["build-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iveevi.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":"2021-12-06T01:56:42.000Z","updated_at":"2025-07-09T14:45:57.000Z","dependencies_parsed_at":"2023-01-27T14:15:56.893Z","dependency_job_id":null,"html_url":"https://github.com/iveevi/smake","commit_stats":null,"previous_names":["iveevi/smake","vedavamadathil/smake"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/iveevi/smake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Fsmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Fsmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Fsmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Fsmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iveevi","download_url":"https://codeload.github.com/iveevi/smake/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Fsmake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["build-system"],"created_at":"2024-11-22T04:14:13.578Z","updated_at":"2026-03-06T01:02:27.268Z","avatar_url":"https://github.com/iveevi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smake\n\nSmake is a simple and convenient build-and-run system for C and C++ projects.\n\n## Why make another build system?\n\nCMake and GNU Make are great build systems. However, as the project gets larger, and as there are increasingly many types of builds (e.g. a builds for debugging), it becomes tedious to add duplicate code.\n\nSmake solves this problem with its target-mode-build hierarchy. In this system,\nevery project has a set of targets, and each target has a set of build modes. When\nsmake is run on a target with a specific build mode, it will run the build \ncorresponding to that mode.\n\n![pictures/smake.png](https://github.com/vedavamadathil/smake/blob/main/pictures/smake.png?raw=true)\n\nEach mode also has a post-build script that can be run. For most builds, this will\nsimply be executing the target object file, but in some cases, the user may want\nto run a different command (i.e. `gdb` or `valgrind`) with the object file.\n\n## Install\n\nSmake can be installed easily with `pip install smake`.\n\nOne can also simply clone the source and link the `smake` executable.\n\n## How does it work?\n\nSmake searches for a `smake.yaml` file in the current directory and creates configurations for each target, including all modes and their \ncorresponding builds and post-build scripts, etc.\n\nThe structure of an `smake` configuration file is as follows (in no strict \norder):\n\n```yaml\n# Variables that can be referenced in builds\ndefinitions:\n  - gsourceA: fileA.c, fileB.c\n\n# List of builds that will be used by the targets\nbuilds:\n  - buildA:\n    - sources: gsourceA     # Reference a group of sources defined\n                            # in the sources section\n  - buildB:\n    - sources: main.c       # Sources can be specified in the build as well\n    - flags: -Wall, -Wextra # Flags are specified here, can be comma\n                            # separated or specified as a list  \n  - buildC:\n    - sources: main.c\n    - flags:  -Wall, -Wextra, -g\n\n# List of all targets\ntargets:\n - targetA:\n  - modes: default          # Specifiy modes here (default mode does\n                            # not really need to be specified)\n  - builds:\n    - default: buildA       # Must specify builds as a pair of `mode: build`\n  \n  # Note that post-build scripts do not need to be specified:\n  #   if nothing is specified, then there is no post-build script\n  - targetB:\n    - modes: default, debug # Comma separated modes\n    - builds:               # Modes are selected using the -m option of smake\n      - default: buildB     #   for example: smake targetB -m debug\n      - debug: buildC       # the default mode is used if no mode is specified\n    - postbuild:            # Post-build scripts, specified per mode (optional)\n      - debug: 'gdb {}'     # The {} is replaced by the target object file\n```\n\nThis configuration allows for the following commands:\n\n```bash\n$ smake targetA\n$ smake targetB\n$ smake targetB -m debug\n```\n\nAs one can imagine, this build system is quite simple, yet powerful.\n\nAnother example of `smake` file can be found inside the `example` directory.\nClone this repository and run `smake` to get started (available targets are\n`smake basic` and `smake multisource`).\n\n## Future features\n\n- [ ] Pre-build scripts, for cases where source code needs to be auto-generated\n- [ ] Add options for parallelizing builds\n- [ ] Easier way to define macro arguments for the compilers\n- [ ] Detect changes in included headers, and the config in general","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiveevi%2Fsmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiveevi%2Fsmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiveevi%2Fsmake/lists"}