Advertisement
xeritt

Auto generate simple Makefile for all languages

Dec 8th, 2021
1,356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2. ## 1.Name`s this script like ---> makefile
  3. ## 2.Put this file in you binary dir like ---> /bin pr /usr/bin
  4. ## 3.Then cd to project dir where file ---> main.cpp
  5. ## 4.Run ---> makefile main
  6. rm -f $1
  7. result=$(make "$1" -n)
  8. echo $1":" > Makefile
  9. echo -e "\t"$result >> Makefile
  10. echo "clean:" >> Makefile
  11. echo -e "\trm -f $1" >> Makefile
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement