changes.src: document WAIT and %$$ fixes
[nasm/avx512.git] / test / Makefile
blob357b9bab9146adcbb9ade4388b064231f784a687
1 .SUFFIXES: .bin .o .o64 .obj .obj64 .exe .asm .lst .pl
3 NASM = ../nasm
4 NASMOPT = -Ox -I../misc
5 PERL = perl
6 TESTS = $(wildcard *.asm)
8 %.bin: %.asm $(NASM)
9 $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
11 %.o: %.asm $(NASM)
12 $(NASM) $(NASMOPT) -f elf32 -o $@ -l $*.lst $<
14 %.o64: %.asm $(NASM)
15 $(NASM) $(NASMOPT) -f elf64 -o $@ -l $*.lst $<
17 %.obj: %.asm $(NASM)
18 $(NASM) $(NASMOPT) -f win32 -o $@ -l $*.lst $<
20 %.obj64: %.asm $(NASM)
21 $(NASM) $(NASMOPT) -f win64 -o $@ -l $*.lst $<
23 %.asm: %.pl
24 $(PERL) $< > $@
26 all:
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)
37 clean:
38 rm -f *.com *.o *.o64 *.obj *.obj64 *.exe *.lst *.bin
39 rm -rf testresults
40 rm -f elftest elftest64
42 spotless: clean
43 rm -rf golden
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 $<
51 elfso.so: elfso.o
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 $<
64 elf64so.so: elf64so.o
65 $(LD) -shared -o $@ $<
67 elftest64: elftest64.c elf64so.so
68 $(CC) -g -o $@ $^
69 -env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH ./elftest64