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 elf32
-o
$@
-l
$*.lst
$<
15 $(NASM
) $(NASMOPT
) -f elf64
-o
$@
-l
$*.lst
$<
18 $(NASM
) $(NASMOPT
) -f win32
-o
$@
-l
$*.lst
$<
20 %.obj64
: %.asm
$(NASM
)
21 $(NASM
) $(NASMOPT
) -f win64
-o
$@
-l
$*.lst
$<
24 $(NASM
) $(NASMOPT
) -f dbg
-o
$@
-l
$*.lst
$<
31 golden
: performtest.pl
$(TESTS
)
32 $(PERL
) performtest.pl
--golden
--nasm
='$(NASM)' $(TESTS
)
34 test: performtest.pl
$(NASM
) $(TESTS
)
35 $(PERL
) performtest.pl
--nasm
='$(NASM)' $(TESTS
)
37 diff
: performtest.pl
$(NASM
) $(TESTS
)
38 $(PERL
) performtest.pl
--diff
--nasm
='$(NASM)' $(TESTS
)
41 rm -f
*.com
*.o
*.o64
*.obj
*.obj64
*.exe
*.lst
*.bin
43 rm -f elftest elftest64
49 # Test for ELF32 shared libraries; assumes an x86 Linux system
51 elfso.o
: elfso.asm
$(NASM
)
52 $(NASM
) $(NASMOPT
) -f elf32
-F stabs
-o
$@
-l
$*.lst
$<
55 $(LD
) -m elf_i386
-shared
-o
$@
$<
57 elftest
: elftest.c elfso.so
58 $(CC
) -g
-m32
-o
$@
$^
59 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest
62 # Test for ELF64 shared libraries; assumes an x86-64 Linux system
64 elf64so.o
: elf64so.asm
$(NASM
)
65 $(NASM
) $(NASMOPT
) -f elf64
-F dwarf
-o
$@
-l
$*.lst
$<
68 $(LD
) -shared
-o
$@
$<
70 elftest64
: elftest64.c elf64so.so
72 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest64