forked from Miroirs/x49gp
add versionning, fix config path in --help
This commit is contained in:
parent
75cbab80ed
commit
0089156ad1
2 changed files with 29 additions and 12 deletions
7
Makefile
7
Makefile
|
@ -4,6 +4,10 @@
|
|||
TARGET = x49gpng
|
||||
TARGET_ALLCAPS = X49GPNG
|
||||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 0
|
||||
PATCHLEVEL = 0
|
||||
|
||||
CC = gcc
|
||||
LD = $(CC)
|
||||
AR = ar
|
||||
|
@ -98,6 +102,9 @@ X49GP_CFLAGS = -O2 \
|
|||
$(DEBUG) \
|
||||
$(INCLUDES) \
|
||||
$(DEFINES) \
|
||||
-DVERSION_MAJOR=$(VERSION_MAJOR) \
|
||||
-DVERSION_MINOR=$(VERSION_MINOR) \
|
||||
-DPATCHLEVEL=$(PATCHLEVEL) \
|
||||
-Wno-error=deprecated-declarations
|
||||
X49GP_LDFLAGS += $(DEBUG) $(GDB_LDFLAGS)
|
||||
X49GP_LDLIBS = $(X49GP_LIBS) $(GDB_LIBS) $(COCOA_LIBS)
|
||||
|
|
16
src/main.c
16
src/main.c
|
@ -26,6 +26,16 @@
|
|||
|
||||
#include "gdbstub.h"
|
||||
|
||||
#ifndef VERSION_MAJOR
|
||||
# define VERSION_MAJOR 0
|
||||
#endif
|
||||
#ifndef VERSION_MINOR
|
||||
#define VERSION_MINOR 0
|
||||
#endif
|
||||
#ifndef PATCHLEVEL
|
||||
#define PATCHLEVEL 0
|
||||
#endif
|
||||
|
||||
static x49gp_t* x49gp;
|
||||
|
||||
/* LD TEMPO HACK */
|
||||
|
@ -278,7 +288,7 @@ static int action_help( struct options* opt, struct option_def* match, char* thi
|
|||
warn_unneeded_param( match, this_opt );
|
||||
|
||||
fprintf( stderr,
|
||||
"Emulator for HP 49G+ / 50G calculators\n"
|
||||
"%s %i.%i.%i Emulator for HP 49G+ / 50G calculators\n"
|
||||
"Usage: %s [<options>] [<config-file>]\n"
|
||||
"Valid options:\n"
|
||||
" -D, --enable-debug[=<port] enable the debugger interface\n"
|
||||
|
@ -304,10 +314,10 @@ static int action_help( struct options* opt, struct option_def* match, char* thi
|
|||
" settings for which\n"
|
||||
"persistence makes sense, like calculator model, CPU"
|
||||
" registers, etc.\n"
|
||||
"If the config file is omitted, ~/.%s/config is used.\n"
|
||||
"If the config file is omitted, ~/.config/%s/config is used.\n"
|
||||
"Please consult the manual for more details on config file"
|
||||
" settings.\n",
|
||||
progname, DEFAULT_GDBSTUB_PORT, progname );
|
||||
progname, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, progname, DEFAULT_GDBSTUB_PORT, progname );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue