Add version number

This commit is contained in:
dogeystamp 2021-08-02 13:55:46 -04:00
parent 36e19e43c3
commit 980001cfc9
No known key found for this signature in database
GPG Key ID: 4B11A996ADE99001
2 changed files with 10 additions and 4 deletions

View File

@ -1,12 +1,13 @@
PREFIX = /usr/local
VERSION = 0.1
SRC = minrss.c util.c net.c xml.c
OBJ = $(SRC:.c=.o)
CC = cc
INCS =
LIBS = -lcurl -I/usr/include/libxml2 -lxml2 -lm
WARN = -Wall -Wpedantic -Wextra
CFLAGS = $(LIBS) $(INCS) $(WARN)
PREFIX = /usr/local
CFLAGS = $(LIBS) $(INCS) $(WARN) -DVERSION=\"$(VERSION)\"
all: config.h minrss

View File

@ -76,8 +76,13 @@ finish(char *url, long responseCode)
}
int
main()
main(int argc, char *argv[])
{
if (argc == 2 && !strcmp("-v", argv[1]))
logMsg(0, "MinRSS %s\n", VERSION);
else if (argc != 1)
logMsg(0, "Usage: minrss [-v]\n");
unsigned int i = 0;
initCurl();