Commit 8e45b106 authored by chenhaowen's avatar chenhaowen

fix: marco VERSION

parent f1f9fbbe
#CC:=gcc
VERSION:=1.6.7
CFLAGS+= -Wall -fPIC -DDEBUG -DVERSION=\"$(VERSION)\"
CFLAGS+= -Wall -fPIC -DDEBUG -DVERSION=$(VERSION)
objects= config.o auth.o
......
......@@ -5,6 +5,10 @@
#include <unistd.h>
#include <getopt.h>
#ifndef VERSION
#define VERSION 0.0.0
#endif
struct option_s {
char key[256];
char value[256];
......@@ -42,7 +46,7 @@ void set_enable_crypt(int enable)
void get_version(char* version)
{
strcpy(version, VERSION);
strcpy(version, "VERSION");
}
void set_log_file(char * log_file, int len)
......
......@@ -6,7 +6,7 @@
#include "config.h"
#ifndef VERSION
#define VERSION "unkown"
#define VERSION 0.0.0
#endif
static void print_help(char * name);
......@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
exit(0);
break;
case 'v':
fprintf(stdout, "version: %s\n", VERSION);
fprintf(stdout, "version: %s\n", "VERSION");
exit(0);
break;
case 'l':
......@@ -107,7 +107,7 @@ static void print_help(char *name)
" /___/ "
);
fprintf(stdout, "A third-party drcom client for gdut. version %s\n", VERSION);
fprintf(stdout, "A third-party drcom client for gdut. version %s\n", "VERSION");
fprintf(stdout, "usage:\n");
fprintf(stdout, " %s\n", name);
fprintf(stdout, " --remote-ip <ip addr> The server ip.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment