I knew how to compile a program with GNU, but some program can be in "Infinity Loop". The goal is to avoid frustration when there is an infinite loop in the program by automatically killing it after some given time interval, called "Time litmit". **How to using GNU Makefile to do it ?**

> 
> Example : Compile & running this code in 1s with n=10^10
> 
> 
> 
> ```
> int main()
> {
>     int n =10000000000;
>     vector<int> a;
>     for (int i=0;i<n)
>         a.push(i);
>     return 0;
> }
> 
> ```
> 
> If program running over 1s, it's must be **killed** and i need a
>  **"Time limited exceeded" notify**.
> 
> 
> 

Sorry for bad English :)