📄 makefile.in
字号:
## This code is pretty well tested, but not optimizing it will have# a *major* effect on speed, so its optimzation flags are separate# from the rest of the release.## For the SPARC v8, at least, gcc produces a *much* faster library than# the SunPro C compiler. On a 50 MHz TI TMS390Z50 SuperSPARC:# 14.5 vs. 47.2 ms per 256-bit modular exponentiation.# 77.4 vs. 317.8 ms per 512-bit modular exponentiation.# 249.0 vs. 1031.5 ms per 1024-bit modular exponentiation#CC=@CC@CFLAGS=@CFLAGS@ @CPPFLAGS@ @WARN@ @TUNE@ @DEFS@ $(DEFINE)srcdir=@srcdir@VPATH=@srcdir@# Extra object files (e.g. assembly routines)OBJS_EXT=# Extra definitions (e.g. -DBNINCLUDE=lbnfoo.h)DEFINE=SHELL = /bin/sh.SUFFIXES:.SUFFIXES: .c .h .oLD =$(CC)LDFLAGS =@LDFLAGS@LIBS_EXT=@LIBS@RANLIB=@RANLIB@# If you plug in a machine-specific assembly file, change this list# of files here.OBJS = bn00.o lbn00.o bn.o lbnmem.o sieve.o prime.o \ bnprint.o legal.o jacobi.o germain.oBNLIB = libbn.a all: $(BNLIB) bntest germtestcheck: bntest ./bntestbntest: bntest00.o $(BNLIB) $(LD) $(LDFLAGS) -o $@ bntest00.o $(BNLIB) $(LIBS_EXT)germtest: germtest.o $(BNLIB) $(LD) $(LDFLAGS) -o $@ germtest.o $(BNLIB) $(LIBS_EXT)$(BNLIB): $(OBJS) $(AR) r $@ $? $(RANLIB) $@# Here we get tricky... if we're compiling with GCC, then we actually do# a link, but with the -r flag (produce relocatable output) and with# -lgcc *only*. This is so that the result can be linked cleanly with# code compiled with another cc, which doesn't know about -lgcc.# Presumably the lbnXX.o file, which has by fast the most math in it,# will have a call to every interesting support-library function.lbn00.o: $(srcdir)/lbn00.c $(HDRS) config.h $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn00.c @GCCMAGIC2@lbn16.o: $(srcdir)/lbn16.c $(HDRS) config.h $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn16.c @GCCMAGIC2@lbn32.o: $(srcdir)/lbn32.c $(HDRS) config.h $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn32.c @GCCMAGIC2@lbn64.o: $(srcdir)/lbn64.c $(HDRS) config.h $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn64.c @GCCMAGIC2@# The default .o rule..c.o: config.h $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ -c $<# Extra, non-obvious dependencies. The BigNum library can be compiled# in three word sizes, and the *00.c files #include the right .c files# based on <limits.h>, which means that a single compilation will# only use a subset of these files. Duplicated here in case someone# regenerates dependencies with cc -M and they get lost.lbn00.o: lbn16.c lbn32.c lbn64.c lbn16.h lbn32.h lbn64.h bn00.o: bn16.c bn32.c bn64.c bn16.h bn32.h bn64.h \ bninit16.c bninit32.c bninit64.cbntest00.o: bntest16.c bntest32.c bntest64.c lbn16.h lbn32.h lbn64.h# Actual build commented out to prevent confusion by people without autoconf# Do it manually for now.configure: configure.in# autoconf# Example programs in the test subdirectory.progs: $(U_DIR)/libbn.a @(echo Compiling test drivers for bn) cd test; makeclean: @$(RM) -f *.o *32.[ch] *64.[ch]BNSOURCES = lbn32.c lbn32.h bn32.c bn32.h bninit32.c bntest32.c \ lbn64.c lbn64.h bn64.c bn64.h bninit64.c bntest64.c# An explicit target that can be made before distribution for# machines that don't have sed.bnsources: $(BNSOURCES)# The 16-bit versions of the code are the master versions; all else is# generated from them. This fiddling about makes them unwriteable# to discourage improper edits.# (You didn't know that suffix rules didn't have to begin with a# period, did you?).SUFFIXES: 16.c 16.h 32.c 32.h 64.c 64.h16.c32.c: @test ! -f $@ -o -w $@ || chmod u+w $@ && test -w $@ || rm -f $@ sed -e s/32/64/g -e s/16/32/g $< > $@ @chmod a-w $@16.h32.h: @test ! -f $@ -o -w $@ || chmod u+w $@ && test -w $@ || rm -f $@ sed -e s/32/64/g -e s/16/32/g $< > $@ @chmod a-w $@16.c64.c: @test ! -f $@ -o -w $@ || chmod u+w $@ && test -w $@ || rm -f $@ sed -e s/32/128/g -e s/16/64/g $< > $@ @chmod a-w $@16.h64.h: @test ! -f $@ -o -w $@ || chmod u+w $@ && test -w $@ || rm -f $@ sed -e s/32/128/g -e s/16/64/g $< > $@ @chmod a-w $@### Dependenciesbn.o: bn.c bn.hbn00.o: bn00.c bnsize00.h lbn.h bn16.c bn32.c bn64.c lbn16.c lbn32.h \ lbn64.h lbnmem.h bn16.h bn32.h bn64.h bn.h kludge.h bninit16.c \ bninit32.c bninit64.cbn16.o: bn16.c lbn.h lbn16.h lbnmem.h bn16.h bn.h kludge.hbn32.o: bn32.c lbn.h lbn32.h lbnmem.h bn32.h bn.h kludge.hbn64.o: bn64.c lbn.h lbn64.h lbnmem.h bn64.h bn.h kludge.hbn68000.o: bn68000.c lbn.h lbn68000.h bn16.h bn32.hbn8086.o: bn8086.c lbn.h bn64.h lbn8086.h bn32.hbninit16.o: bninit16.c bn.h bn16.hbninit32.o: bninit32.c bn.h bn32.hbninit64.o: bninit64.c bn.h bn64.hbnprint.o: bnprint.c bn.h bnprint.h kludge.hbntest00.o: bntest00.c bnsize00.h lbn.h bntest16.c bntest32.c \ bntest64.c cputime.h lbn16.h lbn32.h lbn64.h kludge.hbntest16.o: bntest16.c cputime.h lbn16.h lbn.h kludge.hbntest32.o: bntest32.c cputime.h lbn32.h lbn.h kludge.hbntest64.o: bntest64.c cputime.h lbn64.h lbn.h kludge.hgermain.o: germain.c bn.h germain.h jacobi.h lbnmem.h sieve.h kludge.hgermtest.o: germtest.c bn.h germain.h sieve.h cputime.h bnprint.hjacobi.o: jacobi.c bn.h jacobi.hlbn00.o: lbn00.c bnsize00.h lbn.h lbn16.c lbn16.h lbn32.c lbn32.h \ lbn64.c lbn64.h lbnmem.h legal.h kludge.hlbn16.o: lbn16.c lbn.h lbn16.h lbnmem.h legal.h kludge.hlbn32.o: lbn32.c lbn.h lbn32.h lbnmem.h legal.h kludge.hlbn64.o: lbn64.c lbn.h lbn64.h lbnmem.h legal.h kludge.hlbn68000.o: lbn68000.c lbn.h lbn68000.hlbn68020.o: lbn68020.c lbn.h lbn68020.hlbnmem.o: lbnmem.c lbn.h lbnmem.h kludge.hlbnppc.o: lbnppc.c lbnppc.h ppcasm.hlegal.o: legal.c legal.hprime.o: prime.c bn.h lbnmem.h prime.h sieve.h kludge.hsieve.o: sieve.c bn.h sieve.h kludge.hsizetest.c: bnsize00.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -