# *******************************************************************
# *     Copyright (c) 1994-2005 Jetico, Inc., Finland
# *     All rights reserved.
# *
# *     File:           Makefile
# *
# *     Description:    kgsha makefile 
# *
# *     Scope:          SHA-256 key generator
# *
# *     Platforms:      Linux
# *
# *     Author:         Vitaliy Zolotarev
# *
# *     Revision:	$Id: Makefile,v 1.6 2006/03/07 05:52:28 nail Rel-1.6-3 $
# *
# *******************************************************************/                                                        #

LD = ld -d -shared

CPP=g++
CPPFLAGS = -fPIC -Wall -Werror -fno-strength-reduce -I../include -g

TARGET = libkgsha256.so
HEADERS = kg_defs.h kblock.h

OBJ = alg.o kblock.o kg_misc.o kgsha.o pwldlg.o sha256.o random.o

all: $(TARGET)

%.o: %.cpp
	$(CPP) $(CPPFLAGS) -c -o $@ $<

$(TARGET):	$(OBJ)
		$(LD) $(OBJ)  -o $(TARGET)
		cp -f $(TARGET) ../lib
		cp -f $(HEADERS) ../include
clean:
	rm -f *.o *.ver *~ $(TARGET)
