#
# Makefile for Donkey
#

BINDIR = /usr/local/bin

SRCS = donkey.c getopt.c passphrase.c btoe.c skey.c md.c md2.c md4.c md5.c
OBJS = donkey.o getopt.o passphrase.o btoe.o skey.o md.o md2.o md4.o md5.o
PROG = donkey
CMPT = key

CC	= @CC@
CFLAGS	= @CFLAGS@
#CFLAGS	= -Aa -D_INCLUDE_POSIX_SOURCE
DEFS	= @DEFS@
#DEFS = -DDefaultMD=MD5
LIBS	= @LIBS@

.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $<

all:	$(PROG)

$(PROG):	$(OBJS)
	$(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)

install:
	cp $(PROG) $(BINDIR)
	ln -s $(PROG) $(BINDIR)/$(CMPT)

clean:
	rm -f $(PROG) $(OBJS)

realclean:
	rm -f $(PROG) $(OBJS) config.log config.cache config.status Makefile
