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 47
|
##################################
# <jwright> Well, I may be doing stupid things with make
# <jwright> OK, it was Makefile stupid'ness
# <jwright> I don't really understand what the hell I am doing with Make, I'm
# just copying other files and seeing what works.
# <dragorn> heh
# <dragorn> i think thats all anyone does
# <dragorn> make is a twisted beast
##################################
LDLIBS = -lpcap
CFLAGS += -pipe -Wall -DOPENSSL
LDFLAGS +=
LDLIBS += -lcrypto
#CFLAGS += -static
PROGOBJ = md5.o sha1.o utils.o cowpatty.o genpmk.o
PROG = cowpatty genpmk
BINDIR = /usr/bin
all: $(PROGOBJ) $(PROG)
cowpatty: common.h md5.c md5.h sha1.h cowpatty.c cowpatty.h sha1.c \
sha1.h utils.c utils.h utils.o md5.o sha1.o
$(CC) $(CFLAGS) $(CPPFLAGS) cowpatty.c -o cowpatty utils.o md5.o sha1.o $(LDFLAGS) $(LDLIBS)
genpmk: genpmk.c cowpatty.h utils.h sha1.h common.h utils.o sha1.o
$(CC) $(CFLAGS) $(CPPFLAGS) genpmk.c -o genpmk utils.o sha1.o $(LDFLAGS) $(LDLIBS)
utils: utils.c utils.h
$(CC) $(CFLAGS) $(CPPFLAGS) utils.c -c
md5: md5.c md5.h
$(CC) $(CFLAGS) $(CPPFLAGS) md5.c -c
sha1: sha1.c sha1.h
$(CC) $(CFLAGS) $(CPPFLAGS) sha1.c -c
clean:
@rm -f $(PROGOBJ) $(PROG)
strip:
@ls -l $(PROG)
@strip $(PROG)
@ls -l $(PROG)
install: all
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(PROG) $(DESTDIR)$(BINDIR)
|