diff options
Diffstat (limited to 'demos/engines/rsaref/Makefile')
-rw-r--r-- | demos/engines/rsaref/Makefile | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/demos/engines/rsaref/Makefile b/demos/engines/rsaref/Makefile new file mode 100644 index 0000000000..c6b8957bdd --- /dev/null +++ b/demos/engines/rsaref/Makefile @@ -0,0 +1,90 @@ +LIBNAME= librsaref +SRC= rsaref.c +OBJ= rsaref.o +HEADER= rsaref.h + +CC= gcc +PIC= -fPIC +CFLAGS= -g -I../../../include $(PIC) -DENGINE_DYNAMIC_SUPPORT +AR= ar r +RANLIB= ranlib + +LIB= $(LIBNAME).a +SHLIB= $(LIBNAME).so + +all: + @echo 'Please choose a system to build on:' + @echo '' + @echo 'tru64: Tru64 Unix, Digital Unix, Digital OSF/1' + @echo 'solaris: Solaris' + @echo 'irix: IRIX' + @echo 'hpux32: 32-bit HP/UX' + @echo 'hpux64: 64-bit HP/UX' + @echo 'aix: AIX' + @echo 'gnu: Generic GNU-based system (gcc and GNU ld)' + @echo '' + +FORCE.install: +install: FORCE.install + cd install; \ + make -f unix/makefile INCL='-I. -I/usr/include' CFLAGS='$(INCL) -O -c' RSAREFLIB=librsaref.a librsaref.a + +gnu: install $(SHLIB).gnu +tru64: install $(SHLIB).tru64 +solaris: install $(SHLIB).solaris +irix: install $(SHLIB).irix +hpux32: install $(SHLIB).hpux32 +hpux64: install $(SHLIB).hpux64 +aix: install $(SHLIB).aix + +$(LIB): $(OBJ) + $(AR) $(LIB) $(OBJ) + - $(RANLIB) $(LIB) + +LINK_SO= \ + ld -r -o $(LIBNAME).o $$ALLSYMSFLAGS $(LIB) install/librsaref.a && \ + (nm -Pg $(LIBNAME).o | grep ' [BD] ' | cut -f1 -d' ' > $(LIBNAME).exp; \ + $$SHAREDCMD $$SHAREDFLAGS -o $(SHLIB) $(LIBNAME).o -L ../../.. -lcrypto) + +$(SHLIB).gnu: $(LIB) install/librsaref.a + ALLSYMSFLAGS='--whole-archive' \ + SHAREDFLAGS='-shared -Wl,-soname=$(SHLIB)' \ + SHAREDCMD='$(CC)'; \ + $(LINK_SO) + touch $(SHLIB).gnu +$(SHLIB).tru64: $(LIB) install/librsaref.a + ALLSYMSFLAGS='-all' \ + SHAREDFLAGS='-shared' \ + SHAREDCMD='$(CC)'; \ + $(LINK_SO) + touch $(SHLIB).tru64 +$(SHLIB).solaris: $(LIB) install/librsaref.a + ALLSYMSFLAGS='-z allextract' \ + SHAREDFLAGS='-G -h $(SHLIB)' \ + SHAREDCMD='$(CC)'; \ + $(LINK_SO) + touch $(SHLIB).solaris +$(SHLIB).irix: $(LIB) install/librsaref.a + ALLSYMSFLAGS='-all' \ + SHAREDFLAGS='-shared -Wl,-soname,$(SHLIB)' \ + SHAREDCMD='$(CC)'; \ + $(LINK_SO) + touch $(SHLIB).irix +$(SHLIB).hpux32: $(LIB) install/librsaref.a + ALLSYMSFLAGS='-Fl' \ + SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $(SHLIB)' \ + SHAREDCMD='/usr/ccs/bin/ld'; \ + $(LINK_SO) + touch $(SHLIB).hpux32 +$(SHLIB).hpux64: $(LIB) install/librsaref.a + ALLSYMSFLAGS='+forceload' \ + SHAREDFLAGS='-b -z +h $(SHLIB)' \ + SHAREDCMD='/usr/ccs/bin/ld'; \ + $(LINK_SO) + touch $(SHLIB).hpux64 +$(SHLIB).aix: $(LIB) install/librsaref.a + ALLSYMSFLAGS='-bnogc' \ + SHAREDFLAGS='-G -bE:$(LIBNAME).exp -bM:SRE' \ + SHAREDCMD='$(CC)'; \ + $(LINK_SO) + touch $(SHLIB).aix |