https://github.com/muhand/build_c
A simple bash script which builds C++ applications using G++ compiler from a src into a bin folder
https://github.com/muhand/build_c
Last synced: 2 months ago
JSON representation
A simple bash script which builds C++ applications using G++ compiler from a src into a bin folder
- Host: GitHub
- URL: https://github.com/muhand/build_c
- Owner: Muhand
- License: mit
- Created: 2018-02-05T01:07:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T01:40:11.000Z (over 7 years ago)
- Last Synced: 2025-01-22T02:42:17.782Z (4 months ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# build_c++
A simple bash script which builds C++ applications using G++ compiler from a src into a bin folder## Usage
This is a bash script which is meant to compile simple C++ applications into binary. This script will look at the source folder and produce a bin folder with an output binary file.Using this script is as simple as including this file in the root of your directory then open the terminal and navigate to the root directory and execute the following command
`./build.sh`
This script can take 5 arguments as follows
| Argument | Description | Optional? |
| --------------- |:-------------------------------------------------------------------------------------:| ---------:|
| -s | The source directory, the directory which includes the source code of the application | NO |
| -b | If you prefer a different location for your binar(y/ies) | YES |
| -i | The entry point for your application | NO |
| -o | The output binary name | NO |
| -y | If this flag is set then all questions will be defaulted to yes | NO |## Example
**This is a sample folder structure**
root directory |
| build.sh
| src |
| main.cppThe sample terminal call
`./build.sh -s ./src -b bin -i main -o output -y`
**The output directory structure**
root directory |
| build.sh
| bin |
| output
| src |
| main.cpp