# Makefile for Crackerhack Version 2.0 10/1/92 - No Means No
# If any changes need to be made to support your system, let me know what
# system and how I can fix this for you.  Send me your mail.
# nmn@mindvox.phantom.com

all:
	@echo ''
	@echo 'Crackerhack V2 Makefile - Make one of the following:'
	@echo 'standard - Standard compile on your system without addition of'
	@echo '           any fast encryption libraries.'
	@echo '  addufc - Compile with the Ultra Fast Crypt library. You must'
	@echo '           first make the UFC files in the UFC directory and'
	@echo '           then copy the "libufc.a" file into current directory'
	@echo '           before using make with this option.'
	@echo '   other - Compile Crackerhack with a fast encryption method'
	@echo '           other than UFC. Compile/Make the fast encryption'
	@echo '           program in question and copy the needed file into'
	@echo '           into this directory under the name "other.a".'
	@echo ''
	@echo '   If needed, you can select a compiler other than cc. An'
	@echo 'example would be "make CC=gcc addufc" if you were to use the'
	@echo 'gcc compiler to compile Crackerhack with UFC.'
	@echo '   In my adventures (!) of testing Crackerhack on different'
	@echo 'systems, I discovered that using the -O optimization flag when'
	@echo 'compiling Crackerhack on a NeXT system, screwed up the program.'
	@echo 'This too can be set, or in this case cleared, to fix the'
	@echo 'problem.  An example would be if you were compiling Crackerhack'
	@echo 'on a NeXT system using other: "make CFLAG="" other".'
	@echo ''

# CC = Compiler program (Default 'cc')
# CFLAG = Compiler flags (Default '-O' (optimization))
CC = cc
CFLAG = -O

standard:
	$(CC) $(CFLAG) ch.c -o ch
	$(CC) $(CFLAG) netch.c -o netch
	$(CC) $(CFLAG) setch.c -o setch
	$(CC) $(CFLAG) splitch.c -o splitch
	$(CC) $(CFLAG) timech.c -o timech

addufc:
	$(CC) $(CFLAG) ch.c libufc.a -o ch
	$(CC) $(CFLAG) netch.c -o netch
	$(CC) $(CFLAG) setch.c -o setch
	$(CC) $(CFLAG) splitch.c -o splitch
	$(CC) $(CFLAG) timech.c libufc.a -o timech

other:
	$(CC) $(CFLAG) ch.c other.a -o ch
	$(CC) $(CFLAG) netch.c -o netch
	$(CC) $(CFLAG) setch.c -o setch
	$(CC) $(CFLAG) splitch.c -o splitch
	$(CC) $(CFLAG) timech.c other.a -o timech
