Skip to content

Commit

Permalink
Makefile: Set correct version string when git is not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Chorbadzhiyski committed Sep 20, 2011
1 parent 7eaddb7 commit 0350c69
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
CC = $(CROSS)$(TARGET)gcc
STRIP = $(CROSS)$(TARGET)strip
BUILD_ID = $(shell date +%F_%R)
GIT_VER = $(shell git describe --tags --dirty --always)
CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2 -D_GNU_SOURCE -DBUILD_ID=\"$(BUILD_ID)\" -DGIT_VER=\"$(GIT_VER)\"
VERSION="v1.0"
GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2 -D_GNU_SOURCE -DBUILD_ID=\"$(BUILD_ID)\"
ifneq "$(GIT_VER)" ""
CFLAGS += -DGIT_VER=\"$(GIT_VER)\"
else
CFLAGS += -DGIT_VER=\"$(VERSION)\"
endif

RM = /bin/rm -f
Q = @

Expand Down

0 comments on commit 0350c69

Please sign in to comment.