{"id":27293159,"url":"https://github.com/hellozee/cook","last_synced_at":"2025-04-11T22:42:39.447Z","repository":{"id":57611711,"uuid":"119226485","full_name":"hellozee/cook","owner":"hellozee","description":"A small and fast build system for your C and C++ projects","archived":false,"fork":false,"pushed_at":"2018-10-29T11:09:03.000Z","size":233,"stargazers_count":29,"open_issues_count":4,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-20T13:37:08.104Z","etag":null,"topics":["build-system","cpp","golang","make"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellozee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-28T04:09:29.000Z","updated_at":"2022-07-09T12:32:42.000Z","dependencies_parsed_at":"2022-09-02T12:20:35.005Z","dependency_job_id":null,"html_url":"https://github.com/hellozee/cook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellozee%2Fcook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellozee%2Fcook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellozee%2Fcook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellozee%2Fcook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellozee","download_url":"https://codeload.github.com/hellozee/cook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493000,"owners_count":21113159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cpp","golang","make"],"created_at":"2025-04-11T22:42:38.878Z","updated_at":"2025-04-11T22:42:39.432Z","avatar_url":"https://github.com/hellozee.png","language":"Go","readme":"# Cook \n\nA small and fast build system for your C and C++ projects. \n\n### \u003cu\u003eInstallation\u003c/u\u003e\n\n```bash\ngit clone https://github.com/hellozee/cook\ncd cook\nmake\n```\n\n\n\n### \u003cu\u003eHow to use it?\u003c/u\u003e\n\nIt is simple just like a we have `Makefile` for make, here we will use a `Recipe` file for doing the same thing. \n\n#### \u003cu\u003eSyntax:\u003c/u\u003e\n\nCook is pretty strict on syntax, we have little blocks of what I call entity, there are 2 kinds of entity one is normal entity and another is a special entity for the compiler. Entities have have properties which are called identifiers like the normal entities have `file` and `deps` identifiers.\n\n- `file ` : Location of the file which this entity is about\n- `deps` : Dependencies of the above mentioned file\n\n On the other hand the special entity for compiler has more than just 2 identifiers, which are `binary`  `name` `start`  `ldflags` `includes`  `others`.\n\n- `binary` : The compiler binary which will be used to compile the program\n- `name` : Name of the generated executable\n- `start` :  The root entity, or better say the main entity \n- `ldflags` : Linker directives, enter them as you would enter them in the terminal\n- `includes` : Same as Linker directives but for mentioning special include folders.\n- `others` : Some other flags like `-Wall`\n\nSo how do we separate normal entity from the special compiler entity? Simple, there is special name given to this entity which is `#` , it is reserved and hence can't be used for normal entities, also naming an entity is compulsory as it also be used for figuring out the dependencies since the same name would be used to in the `deps` identifier. Linebreaks are used as delimiter but you can use `;` if you want to mention multiple identifiers in a single line. \n\n##### Example:\n\n```\nentity #{\n        binary = g++;\n        name = GLWindow;\n        start = main;\n        ldflags = -lSDL2 -lGLEW -lGL -lSOIL;\n        includes = ;\n        others = -Wall -Wextra;\n}\n\nentity main{\n        file = main.cpp;\n        deps = camera display mesh shader;\n}\n\nentity camera{\n        file = ui/camera.cpp;\n        deps = ;\n}\n\nentity display{\n        file = ui/display.cpp;\n        deps = ;\n}\n\nentity mesh{\n        file = draw/mesh.cpp;\n        deps = ;\n}\n\nentity shader{\n        file = draw/shader.cpp;\n        deps = ;\n}\n```\n\nThis is the `Recipe` file I am using for practicing `OpenGL` , you can try it on my OpenGL Practice [repository](https://github.com/hellozee/gl-practice) also this is available in examples folder.\n\nAfter creating the `Recipe` file you just execute Cook in the directory containing the `Recipe` file. \n\n**Note:**  This only works for C/C++\n\n### Usage Flags:\n\n- `--help` : To show this help message\n- `--clean` : To clean the cached data\n\n### ToDos:\n\n- Implement `+=` and `-=` operator\n- Add an `import` feature to import other Recipes and recursively cook them\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellozee%2Fcook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellozee%2Fcook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellozee%2Fcook/lists"}