Make file error make: *** [exec] Error 12
While i am running my make file i am getting the following error
$ make -f AIQ2.make
make: Warning: File `AIQ2.make' has modification time 8.4e+02 s in the future
gcc AIQ2.c -o AIQ2
echo "Compile Completed"
Compile Completed
./AIQ2 < input.txt > output.txt
make: *** [exec] Error 12
Here is My makefile
all:compile exec clean
compile:
gcc AIQ2.c -o AIQ2
echo "Compile Completed"
exec:
./AIQ2 < input.txt > output.txt
cat output.txt
clean:
rm AIQ2 output.txt
echo "Clean completed"
Here is my C program:
#include "AIQ2.h"
main()
{
char c;
printf("(a) Print the word \"hello\"\n");
printf("(b) Print the number \"2\"\n");
printf("(c) Print \"Good choice\"\n");
printf("(d) Do nothing\n\n");
printf("Enter choice:");
scanf("%c",&c);
printf("\nYour Choice is :%c",c);
printf("\nOutput is :");
switch(c)
{
case 'a'rintf("hello\n");
break;
case 'b'rintf("2\n");
break;
case 'c'rintf("Good choice\n");
break;
case 'd':break;
default rintf("You have selected an invalid option\n");
return 0;
}
}
|