Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
makeopts.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <stdio.h>
00033
00034
00035
00036
00037
00038 main(argc, argv)
00039 int argc;
00040 char **argv;
00041 {
00042 FILE *fp;
00043 int c;
00044
00045 if (argc < 2) {
00046 fprintf(stderr, "Usage: %s output_file [compiler_options ...]\n",
00047 argv[0]);
00048 exit(1);
00049 }
00050 if ((fp = fopen(argv[1], "w")) == NULL) {
00051 fprintf(stderr, "%s: could not open %s\n", argv[0], argv[1]);
00052 exit(1);
00053 }
00054 fprintf(fp, "/*\n");
00055 fprintf(fp,
00056 " * DO NOT EDIT THIS FILE! It was created automatically by %s.\n",
00057 argv[0]);
00058 fprintf(fp, " */\n\n");
00059 fprintf(fp, "char *vpCompilerOptions = \"");
00060 for (c = 2; c < argc; c++) {
00061 if (c > 2)
00062 fprintf(fp, " ");
00063 fprintf(fp, "%s", argv[c]);
00064 }
00065 fprintf(fp, "\";\n");
00066 exit(0);
00067 }