"Proper" means "compiles and passes test." Versioning is broken (I think).
my $x86_elf_asm="x86cpuid-elf.o:asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o::asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o asm/s512sse2-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
my $x86_coff_asm="x86cpuid-cof.o:asm/bn86-cof.o asm/co86-cof.o:asm/dx86-cof.o asm/yx86-cof.o::asm/bx86-cof.o:asm/mx86-cof.o:asm/sx86-cof.o asm/s512sse2-cof.o:asm/cx86-cof.o:asm/rx86-cof.o:asm/rm86-cof.o:asm/r586-cof.o";
-my $x86_out_asm="x86cpuid-out.o:asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o::asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o asm/s512sse2-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
+my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o:dx86-out.o yx86-out.o::bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
my $no_asm="::::::::::";
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
# Some OpenBSD from Bob Beck <beck@obtuse.com>
"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"OpenBSD-alpha", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"OpenBSD-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"OpenBSD-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"OpenBSD-m68k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"OpenBSD-m88k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"OpenBSD-mips", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
link_app.gnu:
@ $(DO_GNU_APP); $(LINK_APP)
+link_o.bsd:
+ @if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
+ $(CALC_VERSIONS); \
+ SHLIB=lib$(LIBNAME).so; \
+ SHLIB_SUFFIX=; \
+ LIBDEPS=; \
+ ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
+ NOALLSYMSFLAGS=; \
+ SHAREDFLAGS="-shared -nostdlib"; \
+ SHAREDCMD=$(CC); \
+ fi; $(LINK_SO_O)
+link_a.bsd:
+ @if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
+ $(CALC_VERSIONS); \
+ SHLIB=lib$(LIBNAME).so; \
+ SHLIB_SUFFIX=; \
+ LIBDEPS=; \
+ ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
+ NOALLSYMSFLAGS=; \
+ SHAREDFLAGS="-shared -nostdlib"; \
+ SHAREDCMD=$(CC); \
+ fi; $(LINK_SO_A)
+link_app.bsd:
+ @if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
+ LDCMD=$(CC); \
+ LDFLAGS="-Wl,-rpath,$(LIBPATH)"; \
+ LIBDEPS="$(LIBDEPS)"; \
+ APPNAME="$(APPNAME)"; \
+ fi; $(LINK_APP)
+
# For Darwin AKA Mac OS/X (dyld)
link_o.darwin:
@ $(CALC_VERSIONS); \
link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared: link_o.gnu
link_a.bsd-gcc-shared link_a.linux-shared link_a.gnu-shared: link_a.gnu
link_app.bsd-gcc-shared link_app.linux-shared link_app.gnu-shared: link_app.gnu
-symlink.bsd-gcc-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
+symlink.bsd-gcc-shared symlink.bsd-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
+link_o.bsd-shared: link_o.bsd
+link_a.bsd-shared: link_a.bsd
+link_app.bsd-shared: link_app.bsd
link_o.darwin-shared: link_o.darwin
link_a.darwin-shared: link_a.darwin
link_app.darwin-shared: link_app.darwin
CFLAGS= $(INCLUDE) $(CFLAG)
ASFLAGS= $(INCLUDE) $(ASFLAG)
-
+AFLAGS=$(ASFLAGS)
LIBS=
$(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
-x86cpuid-out.o: x86cpuid.pl perlasm/x86asm.pl
- $(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) | as -o $@
+x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
+ $(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@
amd64cpuid.s: amd64cpuid.pl
$(PERL) amd64cpuid.pl $@
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=bftest.c
asm/bx86-cof.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) bf-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
# a.out
-asm/bx86-out.o: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- (cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
+bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/bx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/bx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=bntest.c exptest.c
asm/co86-cof.s: asm/co-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) co-586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/bn86-out.o: asm/bn-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) bn-586.pl a.out $(CFLAGS) | as -o ../$@)
-asm/co86-out.o: asm/co-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) co-586.pl a.out $(CFLAGS) | as -o ../$@)
+bn86-out.s: asm/bn-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) bn-586.pl a.out $(CFLAGS) > ../$@)
+co86-out.s: asm/co-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) co-586.pl a.out $(CFLAGS) > ../$@)
asm/sparcv8.o: asm/sparcv8.S
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* asm/*-cof.* asm/*-out.* asm/ia64.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
+ rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* asm/*-cof.* asm/*-out.* asm/ia64.s *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=casttest.c
asm/cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) cast-586.pl coff $(CLAGS) $(PROCESSOR) > ../$@)
# a.out
-asm/cx86-out.o: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- (cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) | as -o ../$@)
+cx86-out.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) > ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/cx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/cx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=destest.c
asm/yx86-cof.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) crypt586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/dx86-out.o: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- (cd asm; $(PERL) des-586.pl a.out $(CFLAGS) | as -o ../$@)
-asm/yx86-out.o: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- (cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) | as -o ../$@)
+dx86-out.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) des-586.pl a.out $(CFLAGS) > ../$@)
+yx86-out.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) > ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*.s *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=md5test.c
asm/mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) md5-586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/mx86-out.o: asm/md5-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) | as -o ../$@)
+mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/mx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/mx86unix.cpp asm/*.s asm/*.o *.s *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
{ $tmp=push(@out,"TYPE($func,\@function)\n"); }
elsif ($main'coff)
{ $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
- elsif ($main'aout)
+ elsif ($main'aout and !$main'pic)
{ }
else { $tmp=push(@out,".type\t$func,\@function\n"); }
push(@out,".align\t$align\n");
{ push(@out,"TYPE($func,\@function)\n"); }
elsif ($main'coff)
{ $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
- elsif ($main'aout)
+ elsif ($main'aout and !$main'pic)
{ }
else { push(@out,".type $func,\@function\n"); }
push(@out,".align\t$align\n");
}
elsif ($main'aout)
{
- $tmp=<<___; # OpenBSD way...
-.text
-.globl ${under}_GLOBAL_\$I\$$f
+ local($ctor)="${under}_GLOBAL_\$I\$$f";
+ $tmp=".text\n";
+ $tmp.=".type $ctor,\@function\n" if ($main'pic);
+ $tmp.=<<___; # OpenBSD way...
+.globl $ctor
.align 2
-${under}_GLOBAL_\$I\$$f
+$ctor:
jmp $under$f
___
}
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=rc4test.c
asm/rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/rx86-out.o: asm/rc4-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) | as -o ../$@)
+rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) $< $@
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/rx86unix.cpp asm/*.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
+ rm -f asm/rx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=rc5test.c
asm/r586-cof.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) rc5-586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/r586-out.o: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- (cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) | as -o ../$@)
+r586-out.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) > ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/r586unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/r586unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=rmdtest.c
asm/rm86-cof.s: asm/rmd-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rmd-586.pl coff $(CFLAGS) > ../$@)
# a.out
-asm/rm86-out.o: asm/rmd-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) | as -o ../$@)
+rm86-out.s: asm/rmd-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) > ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/rm86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/rm86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=shatest.c sha1test.c sha256t.c sha512t.c
asm/s512sse2-cof.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
# a.out
-asm/sx86-out.o: asm/sha1-586.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
-asm/s512sse2-out.o: asm/sha512-sse2.pl ../perlasm/x86asm.pl
- (cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
+sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
+s512sse2-out.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
asm/sha256-ia64.s: asm/sha512-ia64.pl
(cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/sx86unix.cpp asm/*.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
+ rm -f asm/sx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.