Files

115 lines
1.7 KiB
C
Raw Permalink Normal View History

2025-11-17 10:28:09 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#define COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION "\
#/bin/bash \n\
sh all.sh \n\
"
#define COMPILE_AND_RUN_APPLICATION "\
#/bin/bash \n\
sh compileAndRunApplication.sh \n\
"
#define COMPILE_AND_RUN_PREPROCESSOR "\
#/bin/bash \n\
sh compileAndRunPreprocessor.sh \n\
"
#define COMPILE_APPLICATION "\
#/bin/bash \n\
sh compileApplication.sh \n\
"
#define RUN_APPLICATION "\
#/bin/bash \n\
sh runApplication.sh \n\
"
#define COMPILE_PREPROCESSOR "\
#/bin/bash \n\
sh compilePreprocessor.sh \n\
"
#define RUN_PREPROCESSOR "\
#/bin/bash \n\
sh runPreprocessor.sh \n\
"
int main(int argc, char *argv[])
{
system("clear");
int num;
char * ch;
for(; ;)
{
printf("Enter a choice:\n\n");
printf(" 1: Compile and run preprocessor and your application.\n");
printf(" 2: Compile and run application.\n");
printf(" 3: Compile and run preprocessor.\n");
printf(" 4: Compile application.\n");
printf(" 5: Run application.\n");
printf(" 6: Compile preprocessor.\n");
printf(" 7: run preprocessor.\n\n");
printf(":\n ");
scanf("%d",&num);
switch(num)
{
case 1:
system(COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION);
break;
case 2:
system(COMPILE_AND_RUN_APPLICATION);
break;
case 3:
system(COMPILE_AND_RUN_PREPROCESSOR);
break;
case 4:
system(COMPILE_APPLICATION);
break;
case 5:
system(RUN_APPLICATION);
break;
case 6:
system(COMPILE_PREPROCESSOR);
break;
case 7:
system(RUN_PREPROCESSOR);
default:
system(COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION);
}
}
exit(1);
return 0;
}