#!rebuild # John Halleck, 3 oct 1998 # Rebuild file for all the hash/encryption stuff. # define CC as /usr/uucc/exec/gcc tools {CC} # What environments do we support? define ENVIRONMENTS as SUN HP PC MAC GENERIC {ENVIRONMENTS} <= => echo "setting environment to {target}..." => echo "#define {target}" > environ.h => cat environ.txt >> environ.h # All the C stuff depends on environ.h define ALLC as { dir(.) | -f | only(*.c) } {ALLC} <= environ.h environ.h <= environ.txt => echo "rebuild [platform]" => echo " will set the environment for the correct platform." => echo "Current platforms are: sun hp pc mac and generic" => echo "Example: make sun" => exit 1 ########## # What programs do we support. define PROGRAMS as test hashp shffilt shfstr shffile encrypt decryptmail decrypt shfhash all <= {PROGRAMS} # If there are both .c and .h files, the .c depend on the .h define CLIBS as { dir(.) | -f | *.h => *.c | -e} {CLIBS} <= {file}.h # how to build our libraries. define LIBo as { dir(.) | -f | *.c => *.o } {LIBo} <= {file}.c => {CC} -c {file}.c # Generally build. # .c files produce .o files. *.o <= *.c => {CC} {CCFLAGS} -c {file}.c ################# # dependencies that programs can't guess. define ALLC as { dir(.) | -f | only(*.c) } {ALLC} <= environ.h {PROGRAMS} <= {target}.c {PROGRAMS} <= shf.o hashp <= base64.o shfhash <= hex.o crypt shfstr encrypt decryptmail decrypt <= shcrypt.o encrypt decryptmail decrypt <= basefile.o base64.o crypt.o {PROGRAMS} <= => {CC} -o {target} {parents} # # Housekeeping ------------------------------ clean <= => echo "Removing all intermediate files..." => rm -f {LIBo} {PROGo} core cleanprog <= => echo "Removing programs..." => rm -f {PROGRAMS} core release <= superclean => (cd ..; tar -cvf nahaj.release.tar nahaj) backup <= clean => (cd ..; tar -cvf nahaj.backup.tar nahaj) superclean <= clean cleanprog => echo "Removing environment tags." => rm -f environ.h ###############################