Created
October 20, 2016 06:21
-
-
Save matias-eduardo/8565c95d4fa8abb81fc2588a4cc8d86d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Inspired by 21st Century C, 2nd Ed. <- go check it out! | |
| # Purpose: Compile code from the terminal (stdin). | |
| # Note: allheads.h simply includes all the basic sys h files. | |
| # Careful: using the c2go alias runs then removes the a.out. | |
| # How to use: | |
| # $> go_c << '---' | |
| # heredoc> int main() { printf("Hello from the terminal!\n"); } | |
| # heredoc> --- | |
| # $> c2go | |
| # Hello from the terminal! | |
| # $> | |
| go_libs="-lm" | |
| go_flags="-Wall -Wextra -Werror -include /nfs/2016/m/mfernand/sexyness/allheads.h -O3" | |
| alias go_c="gcc -xc - $go_libs $go_flags" | |
| alias c2go="./a.out; rm ./a.out" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment