Skip to content

Commit cccc4b0

Browse files
committed
Add homepage information to usage info and help
1 parent 583593a commit cccc4b0

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ prefix ?= /usr/local
55
VERSION="0.2.0"
66
AUTHOR="Simon Hilchenbach"
77
YEAR="2016-2026"
8+
HOMEPAGE="https://github.com/shilch/macchanger"
89

910
macchanger: macchanger.m
1011
$(CC) -o $@ $^ $(CFLAGS) \
1112
-DVERSION='${VERSION}' \
1213
-DAUTHOR='${AUTHOR}' \
13-
-DYEAR='${YEAR}'
14+
-DYEAR='${YEAR}' \
15+
-DHOMEPAGE='${HOMEPAGE}'
1416

1517
.PHONY: install
1618
install: macchanger

macchanger.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,16 @@ void print_usage() {
144144
puts(" -p, --permanent Resets the MAC address to the permanent");
145145
puts(" -s, --show Shows the current MAC address");
146146
puts(" -v, --version Prints version");
147+
148+
#ifdef HOMEPAGE
149+
puts("\nHomepage: " HOMEPAGE);
150+
#endif
147151
}
148152

149153
void print_version() {
150-
#if defined(VERSION) && defined(YEAR) && defined(AUTHOR)
151-
puts("Version: " VERSION ", Copyright " YEAR " by " AUTHOR);
154+
#if defined(VERSION) && defined(YEAR) && defined(AUTHOR) && defined(HOMEPAGE)
155+
puts("Version: " VERSION ", Copyright " YEAR " by " AUTHOR);
156+
puts("Homepage: " HOMEPAGE);
152157
#else
153158
puts("Built without version information");
154159
#endif

0 commit comments

Comments
 (0)