updated build system from manual makefile to cmake. added versioning starting at 1.0 with this commit

This commit is contained in:
Rexy712
2018-05-18 12:26:29 -07:00
parent 9d55a23e82
commit 2fe3c80a09
9 changed files with 97 additions and 91 deletions

View File

@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "common.h"
#include "cmd.h"
@@ -30,8 +31,14 @@ void mem_error(void){
//name of the program being run so that we print the correct name in the usage
extern const char* executable_name;
_Noreturn void version(void){
printf("%s version %d.%d\n", executable_name, REXBACKLIGHT_VERSION_MAJOR, REXBACKLIGHT_VERSION_MINOR);
exit(return_value);
}
_Noreturn void usage(int exit_val){
int i;
printf("%s version %d.%d\n\n", executable_name, REXBACKLIGHT_VERSION_MAJOR, REXBACKLIGHT_VERSION_MINOR);
printf("Usage: %s [argument] [options] [argument]\n\n", executable_name);
printf("Options:\n");