1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
# Makefile for password generator under Debian GNU/Linux
#
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
DEBUGARGS = -g
COMPILER = $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
CC_FOR_BUILD ?= $(CC)
# Edited for Debian GNU/Linux
DESTDIR=
BIN=$(DESTDIR)/usr/bin
all : gpw loadtris
echo gpw created, can delete loadtris
gpw : gpw.o debian/randnum.o
$(COMPILER) $(DEBUGARGS) -o gpw gpw.o debian/randnum.o
trigram.h : loadtris
./loadtris /usr/share/dict/words | sed "s/, }/}/" > trigram.h
gpw.o : gpw.c trigram.h
$(COMPILER) $(DEBUGARGS) -o gpw.o -c gpw.c
loadtris : loadtris.o
$(CC_FOR_BUILD) $(DEBUGARGS) -o loadtris loadtris.o
loadtris.o : loadtris.c
$(CC_FOR_BUILD) $(DEBUGARGS) -o loadtris.o -c loadtris.c
debian/randnum.o: debian/randnum.c
$(COMPILER) $(DEBUGARGS) -o debian/randnum.o -c debian/randnum.c
clean :
rm -f gpw loadtris loadtris.o gpw.o debian/randnum.o trigram.h
# Modified for Debian GNU/Linux
install:
install -d $(DESTDIR) $(BIN)
install -m 755 ./gpw $(BIN)
|