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
$<
28 golden
: performtest.pl
$(TESTS
)
29 $(PERL
) performtest.pl
--golden
--nasm
='$(NASM)' $(TESTS
)
31 test: performtest.pl
$(NASM
) $(TESTS
)
32 $(PERL
) performtest.pl
--nasm
='$(NASM)' $(TESTS
)
34 diff
: performtest.pl
$(NASM
) $(TESTS
)
35 $(PERL
) performtest.pl
--diff
--nasm
='$(NASM)' $(TESTS
)
38 rm -f
*.com
*.o
*.o64
*.obj
*.obj64
*.exe
*.lst
*.bin
40 rm -f elftest elftest64
46 # Test for ELF32 shared libraries; assumes an x86 Linux system
48 elfso.o
: elfso.asm
$(NASM
)
49 $(NASM
) $(NASMOPT
) -f elf32
-F stabs
-o
$@
-l
$*.lst
$<
52 $(LD
) -m elf_i386
-shared
-o
$@
$<
54 elftest
: elftest.c elfso.so
55 $(CC
) -g
-m32
-o
$@
$^
56 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest
59 # Test for ELF64 shared libraries; assumes an x86-64 Linux system
61 elf64so.o
: elf64so.asm
$(NASM
)
62 $(NASM
) $(NASMOPT
) -f elf64
-F dwarf
-o
$@
-l
$*.lst
$<
65 $(LD
) -shared
-o
$@
$<
67 elftest64
: elftest64.c elf64so.so
69 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest64