Skip to content

Commit

Permalink
improve version info
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Jan 17, 2024
1 parent 1b86cba commit a9ce19d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 42 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,23 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.


PRGM_NAME = convbin
VERSION_STRING = $(shell git describe --abbrev=8 --dirty --always --tags)

CC = gcc
CFLAGS = -Wall -Wextra -Wshadow -O3 -std=c89 -DNDEBUG -DLOG_BUILD_LEVEL=3 -flto
CFLAGS = -Wall -Wextra -Wshadow -O3 -std=c89 -DNDEBUG -DLOG_BUILD_LEVEL=3 -DPRGM_NAME="\"$(PRGM_NAME)\"" -DVERSION_STRING="\"$(VERSION_STRING)\"" -flto
LDFLAGS = -flto

ifeq ($(OS),Windows_NT)
TARGET ?= convbin.exe
TARGET ?= $(PRGM_NAME).exe
SHELL = cmd.exe
NATIVEPATH = $(subst /,\,$1)
RMDIR = ( rmdir /s /q $1 2>nul || call )
MKDIR = ( mkdir $1 2>nul || call )
STRIP = strip --strip-all "$1"
else
TARGET ?= convbin
TARGET ?= $(PRGM_NAME)
NATIVEPATH = $(subst \,/,$1)
MKDIR = mkdir -p $1
RMDIR = rm -rf $1
Expand Down
3 changes: 1 addition & 2 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "options.h"
#include "output.h"
#include "input.h"
#include "version.h"
#include "log.h"

#include <ctype.h>
Expand Down Expand Up @@ -499,7 +498,7 @@ int options_get(int argc, char *argv[], struct options *options)
break;

case 'v':
LOG_PRINT("%s v%s by mateoconlechuga\n", PRGM_NAME, VERSION_STRING);
LOG_PRINT(VERSION_STRING "\n");
return OPTIONS_IGNORE;

case 'l':
Expand Down
37 changes: 0 additions & 37 deletions src/version.h

This file was deleted.

0 comments on commit a9ce19d

Please sign in to comment.