CC = gcc
CFLAGS = -O3
INSTALLPATH = /usr/bin


PROGRAM = sha1
OBJS = sha1.o sha1file.o endian.o
TEST = sha1test.o sha1.o endian.o timer.o

$(PROGRAM): ${OBJS}
	$(CC) $(OBJS) -o $(PROGRAM)

sha1test: ${TEST}
	$(CC) $(TEST) -o sha1test

clean:
	@rm -rf $(PROGRAM) sha1test *.o

install: $(PROGRAM)
	@echo Installing $(PROGRAM) to $(INSTALLPATH)
	@cp ./$(PROGRAM) /usr/bin
	@chmod 755 /usr/bin/$(PROGRAM)
