1 /********************************************************************* 2 BuildProgram: Compile and run programs using Gnuastro's library 3 BuildProgram is part of GNU Astronomy Utilities (Gnuastro) package. 4 5 Original author: 6 Mohammad Akhlaghi <mohammad@akhlaghi.org> 7 Contributing author(s): 8 Copyright (C) 2017-2021, Free Software Foundation, Inc. 9 10 Gnuastro is free software: you can redistribute it and/or modify it 11 under the terms of the GNU General Public License as published by the 12 Free Software Foundation, either version 3 of the License, or (at your 13 option) any later version. 14 15 Gnuastro is distributed in the hope that it will be useful, but 16 WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>. 22 **********************************************************************/ 23 #ifndef MAIN_H 24 #define MAIN_H 25 26 /* Include necessary headers */ 27 #include <gnuastro/data.h> 28 29 #include <gnuastro-internal/options.h> 30 31 /* Progarm names. */ 32 #define PROGRAM_NAME "BuildProgram" /* Program full name. */ 33 #define PROGRAM_EXEC "astbuildprog" /* Program executable name. */ 34 #define PROGRAM_STRING PROGRAM_NAME" (" PACKAGE_NAME ") " PACKAGE_VERSION 35 36 37 38 39 40 41 42 /* Main program parameters structure */ 43 struct buildprogparams 44 { 45 /* From command-line */ 46 struct gal_options_common_params cp; /* Common parameters. */ 47 gal_list_str_t *sourceargs; /* Source files and arguments. */ 48 gal_list_str_t *include; /* Libraries to link against. */ 49 gal_list_str_t *linkdir; /* Libraries to link against. */ 50 gal_list_str_t *linklib; /* Libraries to link against. */ 51 char *la; /* Libtool '.la' instead of default. */ 52 char *cc; /* C compiler to use. */ 53 uint8_t noenv; 54 55 char *tag; /* Libtool tag (programming language).*/ 56 char *optimize; /* Optimization level. */ 57 char *debug; /* Keep debugging information. */ 58 char *warning; /* Compiler warnings. */ 59 uint8_t onlybuild; /* Don't run the compiled program. */ 60 uint8_t deletecompiled; /* Delete compiled program after running. */ 61 62 /* Output: */ 63 time_t rawtime; /* Starting time of the program. */ 64 }; 65 66 #endif 67