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