nasm/test/Makefile
H. Peter Anvin 1b221bed25 test/Makefile: rule to run performtest --diff
Rule to run performtest with the --diff option.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-04 22:02:44 -07:00

43 lines
909 B
Makefile

.SUFFIXES: .bin .o .o64 .obj .obj64 .exe .asm .lst .pl
NASM = ../nasm
NASMOPT = -Ox -I../misc
PERL = perl
TESTS = $(wildcard *.asm)
%.bin: %.asm $(NASM)
$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
%.o: %.asm $(NASM)
$(NASM) $(NASMOPT) -f elf32 -o $@ -l $*.lst $<
%.o64: %.asm $(NASM)
$(NASM) $(NASMOPT) -f elf64 -o $@ -l $*.lst $<
%.obj: %.asm $(NASM)
$(NASM) $(NASMOPT) -f win32 -o $@ -l $*.lst $<
%.obj64: %.asm $(NASM)
$(NASM) $(NASMOPT) -f win64 -o $@ -l $*.lst $<
%.asm: %.pl
$(PERL) $< > $@
all:
golden: performtest.pl $(TESTS)
$(PERL) performtest.pl --golden --nasm='$(NASM)' $(TESTS)
test: performtest.pl $(NASM) $(TESTS)
$(PERL) performtest.pl --nasm='$(NASM)' $(TESTS)
diff: performtest.pl $(NASM) $(TESTS)
$(PERL) performtest.pl --diff --nasm='$(NASM)' $(TESTS)
clean:
rm -f *.com *.o *.o64 *.obj *.obj64 *.exe *.lst *.bin
rm -rf testresults
spotless: clean
rm -rf golden