diff --git a/Makefile b/Makefile index ae357e6..60c1c4d 100644 --- a/Makefile +++ b/Makefile @@ -18,15 +18,17 @@ # # You can contact me by mail: . -CFLAGS = -Wall -Wextra -Werror -O1 -g -LDFLAGS= -OBJS = dicepwgen.o dictfile.o tossing.o -DST = dicepwgen -PREFIX = /usr/local -UID = root -GID = 0 -MAN = dicepwgen.1 -POD = dicepwgen.pod +CFLAGS = -Wall -Wextra -Werror -O1 -g +LDFLAGS = +OBJS = dicepwgen.o dictfile.o tossing.o debug.o +DST = dicepwgen +PREFIX = /usr/local +UID = root +GID = 0 +MAN = dicepwgen.1 +POD = dicepwgen.pod +DICTFILE = /usr/share/dict/american-english + all: $(DST) @@ -34,7 +36,7 @@ $(DST): $(OBJS) gcc $(OBJS) -o $(DST) %.o: %.c - gcc -c $(CFLAGS) $*.c -o $*.o + gcc -c $(CFLAGS) -DDICTFILE=$(DICTFILE) $*.c -o $*.o clean: rm -f *.o $(DST) diff --git a/README.md b/README.md index f778355..0c4f603 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,12 @@ compile the source code: cd diceware make +Although dicepwgen has an option to specify a dictionary file +on the commandline, there's also a built-in default. This default +can be modified during compilation, e.g.: + + make DICTFILE=/usr/local/share/dict/german.txt + To install, type this command: sudo make install @@ -42,16 +48,21 @@ modify `$PREFIX` during installation time like this: ## Usage -``` -Usage: dice [-tcfvh] -Options: --t Asks interactively for tossed dices --c Number of words (default: 4) --f Dictionary file to use (default: - /usr/share/dict/american-english) --v Print program version --h Print this help screen -``` + Usage: dice [-tcfvhd] + Options: + -t --humantoss Asks interactively for rolled dices + -c --wordcount Number of words (default: 4) + -f --dictfile Dictionary file to use (default: + /usr/share/dict/american-english) + -l --minlen Minimum word len (default: 5) + -m --maxlen Maximum word len (default: 10) + -d --debug Enable debug output + -v --version Print program version + -h -? --help Print this help screen + +If you want to generate a truly random diceware password, use +the option -t. In that case you have to roll physical dices and +enter the results (dicepwgen will ask you for them). ## Getting help