--- rsaref/install/unix/makefile 2018/04/24 16:37:52 1.1.1.1 +++ rsaref/install/unix/makefile 2018/04/24 16:38:23 1.1.1.2 @@ -1,26 +1,11 @@ # This is a makefile for UNIX -# CHANGES MADE TO THIS FILE UNDER RSAREF license clause 1(c): -# -# For the MIT PGP 2.6 distribution, this file was modified to permit -# replacement of the NN_ModExp routine by an equivalent routine -# contained in the PGP 2.6 sources. To enable this change, an #ifdef -# was added to the nn.c file (search for #ifndef USEMPILIB -# below). RSAREF *must* be compiled with USEMPILIB defined for this -# change to occur. -# -# This makefile was changed to use GCC and to define USEMPILIB -# Change made May 21, 1994. -# - # extension for object files O = o # commands -CC = gcc -RANLIB = ranlib +CC = cc LIB = ar -ASM = masm # name of temporary library script TEMPFILE = $(TEMP)/temp.mak @@ -29,34 +14,40 @@ TEMPFILE = $(TEMP)/temp.mak STDINCDIR=/usr/include # The places to look for include files (in order). -INCL = -I. -I$(SRCDIR) -I$(STDINCDIR) +INCL = -I. -I$(RSAREFDIR) -I$(STDINCDIR) # name of main executable to build -PROG = rdemo +PROG = all -# Normal GCC flags. -CFLAGS = $(INCL) -O -c -DPROTOTYPES=1 -DUSEMPILIB -MFLAGS = -I. -I$(SRCDIR) +# Normal C flags. +CFLAGS = $(INCL) -O -c -DPROTOTYPES=1 +MFLAGS = -I. -I$(RSAREFDIR) # The location of the common source directory. -SRCDIR = ../../source/ -SRCLIB = rsaref.a +RSAREFDIR = ../../source/ +RSAREFLIB = rsaref.a # The location of the demo source directory. RDEMODIR = ../../rdemo/ -all : $(SRCLIB) +all : rdemo dhdemo + +rdemo : rdemo.$(O) $(RSAREFLIB) + cc -o $@ rdemo.$(O) $(RSAREFLIB) -rdemo : rdemo.$(O) $(SRCLIB) - $(CC) -o $@ rdemo.$(O) $(SRCLIB) +dhdemo : dhdemo.$(O) $(RSAREFLIB) + cc -o $@ dhdemo.$(O) $(RSAREFLIB) -$(SRCLIB) : desc.$(O) digit.$(O) md2c.$(O) md5c.$(O) nn.$(O) prime.$(O)\ - rsa.$(O) r_encode.$(O) r_enhanc.$(O) r_keygen.$(O) r_random.$(O)\ +$(RSAREFLIB) : desc.$(O) digit.$(O) md2c.$(O) md5c.$(O) nn.$(O) prime.$(O)\ + rsa.$(O) r_encode.$(O) r_dh.$(O) r_enhanc.$(O) r_keygen.$(O) r_random.$(O)\ r_stdlib.$(O) $(LIB) r $@ $? - $(RANLIB) $@ + ranlib $@ -rdemo.$(O) : $(RDEMODIR)rdemo.c global.h $(SRCDIR)rsaref.h +rdemo.$(O) : $(RDEMODIR)rdemo.c $(RSAREFDIR)global.h $(RSAREFDIR)rsaref.h $(CC) $(CFLAGS) $(RDEMODIR)rdemo.c -include $(SRCDIR)targets.mak +dhdemo.$(O) : $(RDEMODIR)dhdemo.c $(RSAREFDIR)global.h $(RSAREFDIR)rsaref.h + $(CC) $(CFLAGS) $(RDEMODIR)dhdemo.c + +include $(RSAREFDIR)targets.mak