1 .SUFFIXES
: .bin .o .o64 .aout .obj .obj64 .exe .asm .lst .pl
5 NASMOPT
= -Ox
-I..
/misc
$(OPT
)
7 TESTS
= $(wildcard *.asm
)
14 %.bin
: %.asm
$(NASMDEP
)
15 $(NASM
) $(NASMOPT
) -f bin
-o
$@
-MD
$@.dep
-l
$@.lst
$<
17 %.ith
: %.asm
$(NASMDEP
)
18 $(NASM
) $(NASMOPT
) -f ith
-o
$@
-MD
$@.dep
-l
$@.lst
$<
20 %.srec
: %.asm
$(NASMDEP
)
21 $(NASM
) $(NASMOPT
) -f srec
-o
$@
-MD
$@.dep
-l
$@.lst
$<
24 $(NASM
) $(NASMOPT
) -f elf32
-o
$@
-MD
$@.dep
-l
$@.lst
$<
26 %.o64
: %.asm
$(NASMDEP
)
27 $(NASM
) $(NASMOPT
) -f elf64
-o
$@
-MD
$@.dep
-l
$@.lst
$<
29 %.aout
: %.asm
$(NASMDEP
)
30 $(NASM
) $(NASMOPT
) -f aout
-o
$@
-MD
$@.dep
-l
$@.lst
$<
32 %.obj
: %.asm
$(NASMDEP
)
33 $(NASM
) $(NASMOPT
) -f obj
-o
$@
-MD
$@.dep
-l
$@.lst
$<
35 %.rdf
: %.asm
$(NASMDEP
)
36 $(NASM
) $(NASMOPT
) -f rdf
-o
$@
-MD
$@.dep
-l
$@.lst
$<
38 %.od
: %.obj ..
/misc
/omfdump
39 ..
/misc
/omfdump
$< > $@
41 %.coff
: %.asm
$(NASMDEP
)
42 $(NASM
) $(NASMOPT
) -f coff
-o
$@
-MD
$@.dep
-l
$@.lst
$<
44 %.win32
: %.asm
$(NASMDEP
)
45 $(NASM
) $(NASMOPT
) -f win32
-o
$@
-MD
$@.dep
-l
$@.lst
$<
47 %.win64
: %.asm
$(NASMDEP
)
48 $(NASM
) $(NASMOPT
) -f win64
-o
$@
-MD
$@.dep
-l
$@.lst
$<
50 %.mo32
: %.asm
$(NASMDEP
)
51 $(NASM
) $(NASMOPT
) -f macho32
-o
$@
-MD
$@.dep
-l
$@.lst
$<
53 %.mo64
: %.asm
$(NASMDEP
)
54 $(NASM
) $(NASMOPT
) -f macho64
-o
$@
-MD
$@.dep
-l
$@.lst
$<
56 %.dbg
: %.asm
$(NASMDEP
)
57 $(NASM
) $(NASMOPT
) -f dbg
-o
$@
-MD
$@.dep
-l
$@.lst
$<
63 $(NASM
) $(NASMOPT
) -E
-o
$@
-MD
$@.dep
$<
67 golden
: performtest.pl
$(TESTS
)
68 $(PERL
) performtest.pl
--golden
--nasm
='$(NASM)' $(TESTS
)
70 test: performtest.pl
$(NASMDEP
) $(TESTS
)
71 $(PERL
) performtest.pl
--nasm
='$(NASM)' $(TESTS
)
73 diff
: performtest.pl
$(NASMDEP
) $(TESTS
)
74 $(PERL
) performtest.pl
--diff
--nasm
='$(NASM)' $(TESTS
)
77 $(RM_F
) *.com
*.o
*.o64
*.aout
*.obj
*.win32
*.win64
*.exe
*.lst
*.bin
78 $(RM_F
) *.dbg
*.coff
*.ith
*.srec
*.mo32
*.mo64
*.i
*.dep
*.rdf
80 $(RM_F
) elftest elftest64
86 # Test for ELF32 shared libraries; assumes an x86 Linux system
88 elfso.o
: elfso.asm
$(NASMDEP
)
89 $(NASM
) $(NASMOPT
) -f elf32
-F stabs
-o
$@
-MD
$@.dep
-l
$@.lst
$<
92 $(LD
) -m elf_i386
-shared
-o
$@
-MD
$@.dep
$<
94 elftest
: elftest.c elfso.so
95 $(CC
) -g
-m32
-o
$@
-MD
$@.dep
$^
96 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest
99 # Test for ELF64 shared libraries; assumes an x86-64 Linux system
101 elf64so.o
: elf64so.asm
$(NASMDEP
)
102 $(NASM
) $(NASMOPT
) -f elf64
-F dwarf
-o
$@
-MD
$@.dep
-l
$@.lst
$<
104 elf64so.so
: elf64so.o
105 $(LD
) -shared
-o
$@
-MD
$@.dep
$<
107 elftest64
: elftest64.c elf64so.so
108 $(CC
) -g
-o
$@
-MD
$@.dep
$^
109 -env LD_LIBRARY_PATH
=.
:$$LD_LIBRARY_PATH .
/elftest64