1 .SUFFIXES
: .bin .o .o64 .obj .obj64 .exe .asm .lst .pl
4 NASMOPT
= -Ox
-I..
/misc
$(OPT
)
6 TESTS
= $(wildcard *.asm
)
12 $(NASM
) $(NASMOPT
) -f bin
-o
$@
-l
$*.lst
$<
15 $(NASM
) $(NASMOPT
) -f ith
-o
$@
-l
$*.lst
$<
18 $(NASM
) $(NASMOPT
) -f srec
-o
$@
-l
$*.lst
$<
21 $(NASM
) $(NASMOPT
) -f elf32
-o
$@
-l
$*.lst
$<
24 $(NASM
) $(NASMOPT
) -f elf64
-o
$@
-l
$*.lst
$<
27 $(NASM
) $(NASMOPT
) -f obj
-o
$@
-l
$*.lst
$<
30 $(NASM
) $(NASMOPT
) -f coff
-o
$@
-l
$*.lst
$<
32 %.win32
: %.asm
$(NASM
)
33 $(NASM
) $(NASMOPT
) -f win32
-o
$@
-l
$*.lst
$<
35 %.win64
: %.asm
$(NASM
)
36 $(NASM
) $(NASMOPT
) -f win64
-o
$@
-l
$*.lst
$<
39 $(NASM
) $(NASMOPT
) -f macho32
-o
$@
-l
$*.lst
$<
42 $(NASM
) $(NASMOPT
) -f macho64
-o
$@
-l
$*.lst
$<
45 $(NASM
) $(NASMOPT
) -f dbg
-o
$@
-l
$*.lst
$<
52 golden
: performtest.pl
$(TESTS
)
53 $(PERL
) performtest.pl
--golden
--nasm
='$(NASM)' $(TESTS
)
55 test: performtest.pl
$(NASM
) $(TESTS
)
56 $(PERL
) performtest.pl
--nasm
='$(NASM)' $(TESTS
)
58 diff
: performtest.pl
$(NASM
) $(TESTS
)
59 $(PERL
) performtest.pl
--diff
--nasm
='$(NASM)' $(TESTS
)
62 rm -f
*.com
*.o
*.o64
*.obj
*.win32
*.win64
*.exe
*.lst
*.bin
63 rm -f
*.dbg
*.coff
*.ith
*.srec
*.mo32
*.mo64
65 rm -f elftest elftest64
71 # Test for ELF32 shared libraries; assumes an x86 Linux system
73 elfso.o
: elfso.asm
$(NASM
)
74 $(NASM
) $(NASMOPT
) -f elf32
-F stabs
-o
$@
-l
$*.lst
$<
77 $(LD
) -m elf_i386
-shared
-o
$@
$<
79 elftest
: elftest.c elfso.so
80 $(CC
) -g
-m32
-o
$@
$^
81 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest
84 # Test for ELF64 shared libraries; assumes an x86-64 Linux system
86 elf64so.o
: elf64so.asm
$(NASM
)
87 $(NASM
) $(NASMOPT
) -f elf64
-F dwarf
-o
$@
-l
$*.lst
$<
90 $(LD
) -shared
-o
$@
$<
92 elftest64
: elftest64.c elf64so.so
94 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest64