summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in129
-rw-r--r--Mkfiles/Makefile.b32121
-rw-r--r--Mkfiles/Makefile.bc3144
-rw-r--r--Mkfiles/Makefile.bor82
-rw-r--r--Mkfiles/Makefile.dj91
-rw-r--r--Mkfiles/Makefile.djo184
-rw-r--r--Mkfiles/Makefile.dl55
-rw-r--r--Mkfiles/Makefile.dos80
-rw-r--r--Mkfiles/Makefile.emx106
-rw-r--r--Mkfiles/Makefile.lcc95
-rw-r--r--Mkfiles/Makefile.ms795
-rw-r--r--Mkfiles/Makefile.os2187
-rw-r--r--Mkfiles/Makefile.sc87
-rw-r--r--Mkfiles/Makefile.scw90
-rw-r--r--Mkfiles/Makefile.unx97
-rw-r--r--Mkfiles/Makefile.vc93
-rw-r--r--Mkfiles/Makefile.wc80
-rw-r--r--Mkfiles/Makefile.wcw80
-rw-r--r--Mkfiles/README18
-rw-r--r--assemble.c37
-rw-r--r--disasm.c33
-rw-r--r--insns.dat28
-rw-r--r--names.c14
-rw-r--r--nasm.h19
-rw-r--r--parser.c13
-rw-r--r--regs.dat68
-rwxr-xr-xregs.pl108
27 files changed, 1397 insertions, 837 deletions
diff --git a/Makefile.in b/Makefile.in
index 9fd2f08..05ddcc6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -18,6 +18,7 @@ CC = @CC@
CFLAGS = @CFLAGS@ @GCCFLAGS@ -I$(srcdir) -I.
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+PERL = perl
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -46,10 +47,12 @@ X = @EXEEXT@
.1.man:
$(NROFF) -man $< > $@
-NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) labels.$(O) \
- parser.$(O) outform.$(O) output/outbin.$(O) output/outaout.$(O) output/outcoff.$(O) output/outelf.$(O) \
- output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) output/outdbg.$(O) output/outieee.$(O) \
- preproc.$(O) listing.$(O) eval.$(O)
+NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) \
+ labels.$(O) parser.$(O) outform.$(O) output/outbin.$(O) \
+ output/outaout.$(O) output/outcoff.$(O) output/outelf.$(O) \
+ output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
+ output/outdbg.$(O) output/outieee.$(O) \
+ preproc.$(O) listing.$(O) eval.$(O)
NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
@@ -62,63 +65,53 @@ nasm$(X): $(NASM)
ndisasm$(X): $(NDISASM)
$(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(LIBS)
-assemble.$(O): assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.$(O): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(O): eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.$(O): float.c nasm.h version.h insnsi.h
-insnsa.$(O): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(O): insnsd.c nasm.h version.h insnsi.h insns.h
-labels.$(O): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(O): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(O): nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h outform.h listing.h insns.h
-nasmlib.$(O): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(O): ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.$(O): output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.$(O): output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.$(O): output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.$(O): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.$(O): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.$(O): output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.$(O): outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.$(O): output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.$(O): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outieee.$(O): output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.$(O): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(O): preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.$(O): sync.c sync.h
-
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
# from the distribution.
insnsa.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
insnsd.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -d $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
insnsi.h: insns.dat insns.pl
- perl $(srcdir)/insns.pl -i $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
insnsn.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
- perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+ $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
version.mac: version version.pl
- perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+ $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
macros.c: macros.pl standard.mac version.mac
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+ $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
-PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c version.h version.mac
+PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
+ regs.c regs.h regflags.c regdis.c regvals.c \
+ version.h version.mac
perlreq: $(PERLREQ)
install: nasm$(X) ndisasm$(X)
@@ -178,3 +171,65 @@ nasm.spec: nasm.spec.in version version.pl
sed -e s/@@VERSION@@/`cat $(srcdir)/version`/g \
-e s/@@ID@@/`$(PERL) $(srcdir)/version.pl id < $(srcdir)/version`/g \
< nasm.spec.in > nasm.spec
+
+#
+# This build dependencies in *ALL* makefiles. Partially for that reason,
+# it's expected to be invoked manually.
+#
+alldeps: perlreq
+ $(PERL) mkdep.pl -M Makefile.in Mkfiles/Makefile.* -- \
+ . output
+ ./config.status
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(O)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(O): assemble.c insns.h assemble.h insnsi.h nasmlib.h version.h \
+ regvals.c nasm.h regs.h
+disasm.$(O): disasm.c insns.h regs.c insnsn.c insnsi.h sync.h version.h \
+ names.c nasm.h regdis.c disasm.h regs.h
+eval.$(O): eval.c labels.h insnsi.h nasmlib.h version.h nasm.h eval.h regs.h
+float.$(O): float.c insnsi.h version.h nasm.h regs.h
+insnsa.$(O): insnsa.c insns.h insnsi.h version.h nasm.h regs.h
+insnsd.$(O): insnsd.c insns.h insnsi.h version.h nasm.h regs.h
+insnsn.$(O): insnsn.c
+labels.$(O): labels.c insnsi.h nasmlib.h version.h nasm.h regs.h
+listing.$(O): listing.c listing.h insnsi.h nasmlib.h version.h nasm.h regs.h
+macros.$(O): macros.c
+names.$(O): names.c insnsn.c regs.c
+nasm.$(O): nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
+ nasm.h regs.h labels.h insnsi.h version.h nasmlib.h eval.h
+nasmlib.$(O): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(O): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(O): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(O): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(O): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(O): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(O): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(O): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(O): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(O): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(O): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(O): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(O): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(O): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(O): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h version.h
+regdis.$(O): regdis.c
+regflags.$(O): regflags.c
+regs.$(O): regs.c
+regvals.$(O): regvals.c
+sync.$(O): sync.c sync.h
diff --git a/Mkfiles/Makefile.b32 b/Mkfiles/Makefile.b32
index 908f48e..7fe78fa 100644
--- a/Mkfiles/Makefile.b32
+++ b/Mkfiles/Makefile.b32
@@ -18,6 +18,8 @@
# MAKEFILE is maintained by Stefan.Hoffmeister@Econos.de
#
+PERL=perl
+
srcdir=.
BINDIR=e:\devel\bcb5\cbuilder5\bin
@@ -112,61 +114,50 @@ ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
$(LIBRARIES)
| # close temp file, first column!
-
-# OBJs with dependencies
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
# from the distribution.
-insnsa.c: InstructionData
-insnsd.c: InstructionData
-insnsi.h: InstructionData
-insnsn.c: InstructionData
+insnsa.c: insns.dat insns.pl
+ $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
-InstructionData: insns.dat insns.pl
- perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
+insnsd.c: insns.dat insns.pl
+ $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
+
+insnsi.h: insns.dat insns.pl
+ $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
+
+insnsn.c: insns.dat insns.pl
+ $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
macros.c: macros.pl standard.mac version.mac
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+ $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
- perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+ $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
version.mac: version version.pl
- perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+ $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
clean:
@-del /S *.obj 2> NUL 1>&2
@@ -175,3 +166,59 @@ clean:
@-del /S *.~* 2> NUL 1>&2
@-del /S nasm$(SUFFIX)$(EXE) 2> NUL 1>&2
@-del /S ndisasm$(SUFFIX)$(EXE) 2> NUL 1>&2
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/" # Is this really right? -hpa
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.bc3 b/Mkfiles/Makefile.bc3
index a59b817..2cf9047 100644
--- a/Mkfiles/Makefile.bc3
+++ b/Mkfiles/Makefile.bc3
@@ -44,6 +44,9 @@ LIB = lib #LIB file extension
# Compilation command line
NASM_ASM=$(CC) $(CCFLAGS) -o$*.$(OBJ) $*.c
+.c.o:
+ $(NASM_ASM)
+
################################################################
#The OBJ files that NASM is dependent on
@@ -91,55 +94,6 @@ $(NDISASMOBJS)
!
################################################################
-# Dependencies for all of NASM's obj files
-
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
- $(NASM_ASM)
-
-float.$(OBJ): float.c nasm.h version.h insnsi.h
- $(NASM_ASM)
-
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
- $(NASM_ASM)
-
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
- $(NASM_ASM)
-
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
- $(NASM_ASM)
-
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
- $(NASM_ASM)
-
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
- $(NASM_ASM)
-
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
- $(NASM_ASM)
-
-################################################################
-# Dependencies for all of NDISASM's obj files
-
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
- $(NASM_ASM)
-
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
- $(NASM_ASM)
-
-sync.$(OBJ): sync.c sync.h
- $(NASM_ASM)
-
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
- $(NASM_ASM)
-
-################################################################
# Build the output formats as a library
# The & ... $? construct tells Borland Make to repeat for all
# out of date dependencies
@@ -148,42 +102,6 @@ output\\out.$(LIB): $(OUTOBJ)
for %a in (output\\*.obj) do tlib /C output\\out.$(LIB) +%a
################################################################
-# Dependencies for all of the output format's OBJ files
-
-output\\outas86.$(OBJ): output\\outas86.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outaout.$(OBJ): output\\outaout.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outbin.$(OBJ): output\\outbin.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outcoff.$(OBJ): output\\outcoff.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outdbg.$(OBJ): output\\outdbg.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outelf.$(OBJ): output\\outelf.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outobj.$(OBJ): output\\outobj.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outrdf.$(OBJ): output\\outrdf.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outrdf2.$(OBJ): output\\outrdf2.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-output\\outieee.$(OBJ): output\\outieee.c nasm.h version.h insnsi.h nasmlib.h
- $(NASM_ASM)
-
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
- $(NASM_ASM)
-
-################################################################
# A quick way to delete the OBJ files as well as the binaries.
clean :
@@ -192,3 +110,59 @@ clean :
-del output\\out.$(LIB)
-del nasm$(EXE)
-del ndisasm$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "\\"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output\\outaout.$(OBJ): output\\outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outas86.$(OBJ): output\\outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outbin.$(OBJ): output\\outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outcoff.$(OBJ): output\\outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outdbg.$(OBJ): output\\outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outelf.$(OBJ): output\\outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outieee.$(OBJ): output\\outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outobj.$(OBJ): output\\outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outrdf.$(OBJ): output\\outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outrdf2.$(OBJ): output\\outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.bor b/Mkfiles/Makefile.bor
index afd1f9b..61d370f 100644
--- a/Mkfiles/Makefile.bor
+++ b/Mkfiles/Makefile.bor
@@ -53,33 +53,63 @@ ndisasm$(EXE): $(NDISASMOBJS)
# $(LINK) /Fendisasm.exe $(NDISASMOBJS)
$(LINK) /Tde $(NDISASMOBJS),ndisasm.exe,,cl.lib,
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
clean :
del *.obj
del nasm$(EXE)
del ndisasm$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/" # Is this really right? -hpa
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
index d46b3b6..3b8db41 100644
--- a/Mkfiles/Makefile.dj
+++ b/Mkfiles/Makefile.dj
@@ -36,32 +36,6 @@ nasm.exe: $(NASM)
ndisasm.exe: $(NDISASM)
$(CC) -o $@ $(NDISASM)
-assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.o: float.c nasm.h version.h insnsi.h
-insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.o: sync.c sync.h
-
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
@@ -91,6 +65,71 @@ version.mac: version version.pl
macros.c: macros.pl standard.mac version.mac
perl macros.pl standard.mac version.mac
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ perl regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ perl regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ perl regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ perl regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ perl regs.pl h regs.dat > regs.h
+
clean:
rm -f *.o *.exe output/*.o
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".o"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.o: eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+float.o: float.c nasm.h regs.h insnsi.h version.h
+insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.o: insnsn.c
+labels.o: labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.o: listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h version.h
+macros.o: macros.c
+names.o: names.c regs.c insnsn.c
+nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
+ nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.o: nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.o: outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.o: output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.o: output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.o: output/outbin.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outelf.o: output/outelf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outieee.o: output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.o: output/outobj.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.o: parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.o: preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h version.h
+regdis.o: regdis.c
+regflags.o: regflags.c
+regs.o: regs.c
+regvals.o: regvals.c
+sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.djo b/Mkfiles/Makefile.djo
index e33e01c..34488eb 100644
--- a/Mkfiles/Makefile.djo
+++ b/Mkfiles/Makefile.djo
@@ -6,12 +6,9 @@
#
# It uses the syntax of "Opus Make", which is the make program I prefer.
#
-# It builds five targets:
+# It builds two targets:
#
-# nasm16.exe 16-bit built with Turbo-C
# nasm.exe 32-bit built with DJGPP
-# nasmd.exe nasm.exe with debug information (for use with gdb etc.)
-# nasml.exe nasm.exe with logging version of malloc (to find memory leaks)
# ndisasm.exe NASM disassembler (DJGPP version)
.SUFFIXES:
@@ -33,27 +30,11 @@ CFLAGS = -O3
# redir -eo $(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.c >$*.err
$(CC) -g -c -O2 -finline-functions -Wall -ansi -pedantic $*.c
-.c.ol:
- $(CC) -DLOGALLOC -g -c -o $*.ol $(CFLAGS) $*.c
-
-.c.obj:
- tcc -O -Z -c -ml -d -DOF_ONLY -DOF_BIN -DOF_OBJ -If:\public\turboc -I. $*.c >$*.err
-
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outieee.o output/outdbg.o preproc.o listing.o \
eval.o
-NASML = nasm.ol nasmlib.ol float.ol insnsa.ol assemble.ol labels.ol \
- parser.ol outform.ol output/outbin.ol output/outaout.ol output/outcoff.ol output/outelf.ol \
- output/outobj.ol output/outas86.ol output/outrdf.ol output/outrdf2.ol output/outieee.ol output/outdbg.ol preproc.ol listing.ol \
- eval.ol
-
-NASM16 = nasm.obj nasmlib.obj float.obj insnsa.obj assemble.obj labels.obj \
- parser.obj outform.obj output/outbin.obj \
- output/outobj.obj preproc.obj listing.obj \
- eval.obj
-
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
nasm.exe: $(NASM)
@@ -68,103 +49,6 @@ ndisasm.exe: $(NDISASM)
<<
djp ndisasm.exe
-nasml.exe: $(NASML)
- $(CC) @<<
--s -o $@ $(NASML)
-<<
-
-nasm16.exe: $(NASM16)
- tlink @<<
-f:\public\turboc\lib\c0l.obj $(NASM16)
-$@
-
-f:\public\turboc\lib\cl.lib
-<< > nasm16.err
-
-
-nasmd.exe: $(NASM)
- $(CC) @<<
--g -o $@ $(NASM)
-<<
-
-assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.o: float.c nasm.h version.h insnsi.h
-insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.o: sync.c sync.h
-output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-
-assemble.ol: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.ol: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.ol: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.ol: float.c nasm.h version.h insnsi.h
-insnsa.ol: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.ol: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.ol: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.ol: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.ol: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.ol: nasmlib.c nasm.h version.h insnsi.h nasmlib.h
-ndisasm.ol: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.ol: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.ol: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.ol: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.ol: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.ol: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.ol: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.ol: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.ol: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.ol: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.ol: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.ol: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.ol: sync.c sync.h
-output/outieee.ol: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-
-assemble.obj: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.obj: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.obj: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.obj: float.c nasm.h version.h insnsi.h
-insnsa.obj: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.obj: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.obj: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.obj: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.obj: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.obj: nasmlib.c nasm.h version.h insnsi.h nasmlib.h
-ndisasm.obj: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.obj: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.obj: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.obj: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.obj: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.obj: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.obj: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.obj: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.obj: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.obj: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.obj: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.obj: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.obj: sync.c sync.h
-output/outieee.obj: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-
# These four source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
@@ -188,5 +72,71 @@ version.mac: version version.pl
macros.c: standard.mac macros.pl version.mac
perl macros.pl standard.mac version.mac
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ perl regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ perl regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ perl regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ perl regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ perl regs.pl h regs.dat > regs.h
+
clean:
rm -f *.o nasm ndisasm
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".o"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.o: eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+float.o: float.c nasm.h regs.h insnsi.h version.h
+insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.o: insnsn.c
+labels.o: labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.o: listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h version.h
+macros.o: macros.c
+names.o: names.c regs.c insnsn.c
+nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
+ nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.o: nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.o: outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.o: output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.o: output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.o: output/outbin.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outelf.o: output/outelf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outieee.o: output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.o: output/outobj.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.o: parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.o: preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h version.h
+regdis.o: regdis.c
+regflags.o: regflags.c
+regs.o: regs.c
+regvals.o: regvals.c
+sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.dl b/Mkfiles/Makefile.dl
index a13d19d..712bb41 100644
--- a/Mkfiles/Makefile.dl
+++ b/Mkfiles/Makefile.dl
@@ -42,3 +42,58 @@ clean :
del *.map
del *.exe
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.dos b/Mkfiles/Makefile.dos
index 02e2180..a7dbfc2 100644
--- a/Mkfiles/Makefile.dos
+++ b/Mkfiles/Makefile.dos
@@ -42,30 +42,6 @@ nasm$(EXE): $(NASMOBJS)
ndisasm$(EXE): $(NDISASMOBJS)
cl /Fendisasm.exe $(NDISASMOBJS)
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
# Another grotty hack: QC is less likely to run out of memory than
# CL proper; and we don't need any optimisation in these modules
# since they're just data.
@@ -78,3 +54,59 @@ clean :
del *.obj
del nasm$(EXE)
del ndisasm$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.emx b/Mkfiles/Makefile.emx
index 89e9f76..27427df 100644
--- a/Mkfiles/Makefile.emx
+++ b/Mkfiles/Makefile.emx
@@ -25,6 +25,7 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
NROFF = echo
+PERL = perl
.SUFFIXES: .c .i .s .o .1 .man
@@ -59,60 +60,47 @@ nasm: $(NASM)
ndisasm: $(NDISASM)
$(CC) $(LDFLAGS) -o ndisasm $(NDISASM) $(LIBS)
-assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.o: float.c nasm.h version.h insnsi.h
-insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.o: sync.c sync.h
-output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
# from the distribution.
insnsa.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -a $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
insnsd.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -d $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
insnsi.h: insns.dat insns.pl
- perl $(srcdir)/insns.pl -i $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
insnsn.c: insns.dat insns.pl
- perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
+ $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
- perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+ $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
version.mac: version version.pl
- perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+ $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
macros.c: standard.mac macros.pl version.mac
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+ $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
@@ -150,3 +138,55 @@ everything: all doc rdf
install_everything: everything install install_doc install_rdf
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".o"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.o: eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+float.o: float.c nasm.h regs.h insnsi.h version.h
+insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.o: insnsn.c
+labels.o: labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.o: listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h version.h
+macros.o: macros.c
+names.o: names.c regs.c insnsn.c
+nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
+ nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.o: nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.o: outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.o: output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.o: output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.o: output/outbin.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outelf.o: output/outelf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outieee.o: output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.o: output/outobj.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.o: parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.o: preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h version.h
+regdis.o: regdis.c
+regflags.o: regflags.c
+regs.o: regs.c
+regvals.o: regvals.c
+sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.lcc b/Mkfiles/Makefile.lcc
index 460bf86..18baa57 100644
--- a/Mkfiles/Makefile.lcc
+++ b/Mkfiles/Makefile.lcc
@@ -68,32 +68,6 @@ nasm: $(NASM) nasm.lnk
ndisasm: $(NDISASM) ndisasm.lnk
$(LD) -o ndisasm.exe @ndisasm.lnk
-assemble.${OBJ}: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.${OBJ}: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.${OBJ}: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.${OBJ}: float.c nasm.h version.h insnsi.h
-insnsa.${OBJ}: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.${OBJ}: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.${OBJ}: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.${OBJ}: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.${OBJ}: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.${OBJ}: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.${OBJ}: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.${OBJ}: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.${OBJ}: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.${OBJ}: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.${OBJ}: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.${OBJ}: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.${OBJ}: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.${OBJ}: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.${OBJ}: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.${OBJ}: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outieee.${OBJ}: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.${OBJ}: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.${OBJ}: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.${OBJ}: sync.c sync.h
-
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
# though, so it isn't necessary to have Perl just to recompile NASM
@@ -117,5 +91,74 @@ version.mac: version version.pl
macros.c: standard.mac macros.pl version.mac
perl macros.pl standard.mac version.mac
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ perl regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ perl regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ perl regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ perl regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ perl regs.pl h regs.dat > regs.h
+
clean:
rm -f *.${OBJ} nasm.exe ndisasm.exe
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".${OBJ}"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.${OBJ}: assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.${OBJ}: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.${OBJ}: eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.${OBJ}: float.c nasm.h regs.h insnsi.h version.h
+insnsa.${OBJ}: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.${OBJ}: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.${OBJ}: insnsn.c
+labels.${OBJ}: labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.${OBJ}: listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.${OBJ}: macros.c
+names.${OBJ}: names.c regs.c insnsn.c
+nasm.${OBJ}: nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.${OBJ}: nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.${OBJ}: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.${OBJ}: outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.${OBJ}: output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.${OBJ}: output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.${OBJ}: output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.${OBJ}: output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.${OBJ}: output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.${OBJ}: output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.${OBJ}: output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.${OBJ}: output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.${OBJ}: output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.${OBJ}: output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.${OBJ}: parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.${OBJ}: preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.${OBJ}: regdis.c
+regflags.${OBJ}: regflags.c
+regs.${OBJ}: regs.c
+regvals.${OBJ}: regvals.c
+sync.${OBJ}: sync.c sync.h
diff --git a/Mkfiles/Makefile.ms7 b/Mkfiles/Makefile.ms7
index cfc225a..73605f0 100644
--- a/Mkfiles/Makefile.ms7
+++ b/Mkfiles/Makefile.ms7
@@ -91,33 +91,6 @@ output\nasmlib.h: nasmlib.h
output\outform.h: outform.h
copy outform.h output
-
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h version.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c version.h
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-output\outas86.$(OBJ): output\outas86.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outaout.$(OBJ): output\outaout.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outbin.$(OBJ): output\outbin.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outcoff.$(OBJ): output\outcoff.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outdbg.$(OBJ): output\outdbg.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outelf.$(OBJ): output\outelf.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outobj.$(OBJ): output\outobj.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outrdf.$(OBJ): output\outrdf.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outrdf2.$(OBJ): output\outrdf2.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-output\outieee.$(OBJ): output\outieee.c output\nasm.h output\insnsi.h output\nasmlib.h output\outform.h output\version.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
-
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
@@ -140,6 +113,19 @@ insns16.dat: insns.dat
grep -v WILLAMETTE insns.dat | grep -v KATMAI | grep -v SSE | \
grep -v MMX | grep -v 3DNOW | grep -v UNDOC >insns16.dat
+# These source files are generated from regs.dat by yet another
+# perl script.
+ regs.c: regs.dat regs.pl
+ perl regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ perl regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ perl regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ perl regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ perl regs.pl h regs.dat > regs.h
+
# Another grotty hack: QC is less likely to run out of memory than
# CL proper; and we don't need any optimisation in these modules
# since they're just data.
@@ -166,3 +152,58 @@ spotless: clean
del insnsn.c
del version.h
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "\"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output\outaout.$(OBJ): output\outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outas86.$(OBJ): output\outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outbin.$(OBJ): output\outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outcoff.$(OBJ): output\outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outdbg.$(OBJ): output\outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outelf.$(OBJ): output\outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outieee.$(OBJ): output\outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outobj.$(OBJ): output\outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outrdf.$(OBJ): output\outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\outrdf2.$(OBJ): output\outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.os2 b/Mkfiles/Makefile.os2
index 4c9dc07..cccf6a2 100644
--- a/Mkfiles/Makefile.os2
+++ b/Mkfiles/Makefile.os2
@@ -28,17 +28,11 @@ LIBS = c2 + os2
#
# --------------------------------------------------------------------------
-CCFLAGS = /c /v /b
+CCFLAGS = /d /c /O /v /b
CC = bcc #compiler
LINK = tlink #linker
-DCCFLAGS = /d /c /O /A #compiler flags for NDISASM
- #/d=merge dupicate strings
- #/c=compile only
- #/O=Optimise jumps
- #/A=ANSI standard C
-
LINKFLAGS = /c /x #linker flags
#/c=case sIgnificance on symbols
#/x=No map file at all
@@ -47,35 +41,32 @@ LIBRARIES = #any libaries to add, out side of the standard libary
EXE = .exe #executable file extention (keep the . as the start)
OBJ = obj #OBJ file extention
-NASM_ASM=$(CC) $(CCFLAGS) $&.c #Command line for NASM
-DASM_ASM=$(CC) $(DCCFLAGS) $&.c #command line for NDISASM
+# How to build an object file from a C file
+.c.$(OBJ):
+ $(CC) $(CCFLAGS) /o$*.$(OBJ) $*.c
-# NOTE: $& is used to create the file name, as it only gives the name it's
-# self, where as using $* would have give the full path of the file it
-# want's done. This becomes a problem if the OBJ files are in a seperate
-# directory, becuse it will then try to find the source file in the OBJ
-# dir.
################################################################
#The OBJ files that NASM is dependent on
-NASMOBJS = $(OBJD)nasm.$(OBJ) $(OBJD)nasmlib.$(OBJ) $(OBJD)float.$(OBJ) \
- $(OBJD)insnsa.$(OBJ) $(OBJD)assemble.$(OBJ) $(OBJD)labels.$(OBJ) \
- $(OBJD)parser.$(OBJ) $(OBJD)outform.$(OBJ) $(OBJD)preproc.$(OBJ) \
- $(OBJD)listing.$(OBJ) $(OBJD)eval.$(OBJ) $(OBJD)outrdf2.$(OBJ) $(OBJD)zoutieee.$(OBJ)
+NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) \
+ insnsa.$(OBJ) assemble.$(OBJ) labels.$(OBJ) \
+ parser.$(OBJ) outform.$(OBJ) preproc.$(OBJ) \
+ listing.$(OBJ) eval.$(OBJ)
################################################################
#The OBJ files that NDISASM is dependent on
-NDISASMOBJS = $(OBJD)ndisasm.$(OBJ) $(OBJD)disasm.$(OBJ) $(OBJD)sync.$(OBJ) \
- $(OBJD)nasmlibd.$(OBJ) $(OBJD)insnsd.$(OBJ)
+NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) \
+ nasmlib.$(OBJ) insnsd.$(OBJ)
################################################################
#The OBJ file for the output formats.
-OUTOBJ= $(OBJD)outbin.$(OBJ) $(OBJD)outaout.$(OBJ) $(OBJD)outcoff.$(OBJ) \
- $(OBJD)outelf.$(OBJ) $(OBJD)outobj.$(OBJ) $(OBJD)outas86.$(OBJ) \
- $(OBJD)outrdf.$(OBJ) $(OBJD)outdbg.$(OBJ)
+OUTOBJ= output\\outbin.$(OBJ) output\\outaout.$(OBJ) output\\outcoff.$(OBJ) \
+ output\\outelf.$(OBJ) output\\outobj.$(OBJ) output\\outas86.$(OBJ) \
+ output\\outrdf.$(OBJ) output\\outdbg.$(OBJ) output\\outrdf2.$(OBJ) \
+ output\\outieee.$(OBJ)
################################################################
@@ -103,102 +94,66 @@ ndisasm2$(EXE): $(NDISASMOBJS)
$(LIBS) $(LIBRARIES) #Libaries needed
!
-################################################################
-# Dependencies for all of NASM's obj files
-
-$(OBJD)assemble.$(OBJ): assemble.c nasm.h version.h assemble.h insns.h
- $(NASM_ASM)
-
-$(OBJD)float.$(OBJ): float.c nasm.h version.h
- $(NASM_ASM)
-
-$(OBJD)labels.$(OBJ): labels.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)listing.$(OBJ): listing.c nasm.h version.h nasmlib.h listing.h
- $(NASM_ASM)
-
-$(OBJD)eval.$(OBJ): eval.c nasm.h version.h nasmlib.h eval.h
- $(NASM_ASM)
-
-$(OBJD)nasm.$(OBJ): nasm.c nasm.h version.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
- $(NASM_ASM)
-
-$(OBJD)nasmlib.$(OBJ): nasmlib.c nasm.h version.h nasmlib.h names.c insnsn.c
- $(NASM_ASM)
-
-$(OBJD)parser.$(OBJ): parser.c nasm.h version.h nasmlib.h parser.h float.h names.c
- $(NASM_ASM)
-
-$(OBJD)preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)insnsa.$(OBJ): insnsa.c nasm.h version.h insns.h
- $(NASM_ASM)
-
-################################################################
-# Dependencies for all of NDISASM's obj files
-
-$(OBJD)disasm.$(OBJ): disasm.c nasm.h version.h disasm.h sync.h insns.h names.c
- $(DASM_ASM)
-
-$(OBJD)ndisasm.$(OBJ): ndisasm.c nasm.h version.h sync.h disasm.h
- $(DASM_ASM)
-
-$(OBJD)sync.$(OBJ): sync.c sync.h
- $(DASM_ASM)
-
-$(OBJD)insnsd.$(OBJ): insnsd.c nasm.h version.h insns.h
- $(DASM_ASM)
-
-# This is a kludge from the word go, as we can't use the nasmlib.obj compiled
-# for NASM, as it's could be the wrong model size, so we have to compile it
-# again as huge to make sure.
-#
-# So as not to overwrite the nasmlib.obj for NASM (if it did, that
-# could cause all kinds of problems) it compiles it into nasmlibd.obj.
-#
-# the -o... switch tells it the name to compile the obj file to, right here
-# $(OBJD)nasmlibd.obj
-
-$(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h version.h nasmlib.h
- $(CC) $(DCCFLAGS) -o$(OBJD)nasmlibd.obj nasmlib.c
-
-################################################################
-# Dependencies for all of the output format's OBJ files
-
-$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h version.h nasmlib.h
- $(NASM_ASM)
-
-$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h version.h
- $(NASM_ASM)
-
-################################################################
-# A quick way to delete the OBJ files as well as the binaries.
-
clean :
- del $(OBJD)*.obj
+ del *.obj
del nasmos2$(EXE)
del ndisasm2$(EXE)
# Makefile created by Chuck Crayne <ccrayne@pacific.net> --05/4/99
# Based on Makefile.bc2 by Fox Cutter <lmb@comtch.iea.com> --01/27/97
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "\\"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output\\outaout.$(OBJ): output\\outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outas86.$(OBJ): output\\outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outbin.$(OBJ): output\\outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outcoff.$(OBJ): output\\outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outdbg.$(OBJ): output\\outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outelf.$(OBJ): output\\outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outieee.$(OBJ): output\\outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outobj.$(OBJ): output\\outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outrdf.$(OBJ): output\\outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output\\outrdf2.$(OBJ): output\\outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.sc b/Mkfiles/Makefile.sc
index 429d7a6..25a1048 100644
--- a/Mkfiles/Makefile.sc
+++ b/Mkfiles/Makefile.sc
@@ -76,41 +76,66 @@ cx.obj $(NDISASMOBJS)
ndisasm.exe
<<
-
-
#
# modules for programs
#
-
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-
-
-
clean :
del *.obj
del nasm$(EXE)
del ndisasm$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.scw b/Mkfiles/Makefile.scw
index 8922df3..a372b61 100644
--- a/Mkfiles/Makefile.scw
+++ b/Mkfiles/Makefile.scw
@@ -76,41 +76,63 @@ $(NDISASMOBJS)
ndisasmw.exe;
<<
-
-
-#
-# modules for programs
-#
-
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-
-
-
clean :
del *.obj
del nasmw$(EXE)
del ndisasmw$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.unx b/Mkfiles/Makefile.unx
index 012edec..1c66d00 100644
--- a/Mkfiles/Makefile.unx
+++ b/Mkfiles/Makefile.unx
@@ -46,32 +46,6 @@ nasm: $(NASM)
ndisasm: $(NDISASM)
$(CC) -o ndisasm $(NDISASM)
-assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insnsn.c
-disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
-float.o: float.c nasm.h version.h insnsi.h
-insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
-labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
- outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h version.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
-output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
-sync.o: sync.c sync.h
-
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
@@ -99,9 +73,25 @@ insnsi.h: insns.pl insns.dat
insnsn.c: insns.pl insns.dat
$(PERL) insns.pl -n insns.dat
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ $(PERL) regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ $(PERL) regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ $(PERL) regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ $(PERL) regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ $(PERL) regs.pl h regs.dat > regs.h
+
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
-perlreq: macros.c insnsa.c insnsd.c insnsi.h insnsn.c version.h version.mac
+PERLREQ = macros.c insnsa.c insnsd.c insnsi.h insnsn.c \
+ regs.c regs.h regflags.c regdis.c regvals.c \
+ version.h version.mac
+perlreq: $(PERLREQ)
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(bindir)/nasm
@@ -118,3 +108,56 @@ rdf:
rdf_install install_rdf:
$(MAKE) -C rdoff install
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".o"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.o: assemble.c insns.h assemble.h regvals.c nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+disasm.o: disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.o: eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+float.o: float.c nasm.h regs.h insnsi.h version.h
+insnsa.o: insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.o: insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.o: insnsn.c
+labels.o: labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.o: listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h version.h
+macros.o: macros.c
+names.o: names.c regs.c insnsn.c
+nasm.o: nasm.c listing.h preproc.h insns.h outform.h assemble.h parser.h \
+ nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.o: nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.o: ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.o: outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.o: output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.o: output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.o: output/outbin.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outcoff.o: output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.o: output/outdbg.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outelf.o: output/outelf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outieee.o: output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.o: output/outobj.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf.o: output/outrdf.c outform.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+output/outrdf2.o: output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.o: parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.o: preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h version.h
+regdis.o: regdis.c
+regflags.o: regflags.c
+regs.o: regs.c
+regvals.o: regvals.c
+sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.vc b/Mkfiles/Makefile.vc
index bc20308..b6317a5 100644
--- a/Mkfiles/Makefile.vc
+++ b/Mkfiles/Makefile.vc
@@ -41,30 +41,6 @@ nasm$(SUFFIX)$(EXE): $(NASMOBJS)
ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
cl /Fendisasm$(SUFFIX).exe $(NDISASMOBJS)
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
# Another grotty hack: QC is less likely to run out of memory than
# CL proper; and we don't need any optimisation in these modules
# since they're just data.
@@ -102,7 +78,76 @@ version.mac: version version.pl
macros.c: macros.pl standard.mac version.mac
perl macros.pl standard.mac version.mac
+# These source files are generated from regs.dat by yet another
+# perl script.
+regs.c: regs.dat regs.pl
+ perl regs.pl c regs.dat > regs.c
+regflags.c: regs.dat regs.pl
+ perl regs.pl fc regs.dat > regflags.c
+regdis.c: regs.dat regs.pl
+ perl regs.pl dc regs.dat > regdis.c
+regvals.c: regs.dat regs.pl
+ perl regs.pl vc regs.dat > regvals.c
+regs.h: regs.dat regs.pl
+ perl regs.pl h regs.dat > regs.h
+
clean :
del *.obj
del nasm$(SUFFIX)$(EXE)
del ndisasm$(SUFFIX)$(EXE)
+
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.wc b/Mkfiles/Makefile.wc
index 4820f31..87fe397 100644
--- a/Mkfiles/Makefile.wc
+++ b/Mkfiles/Makefile.wc
@@ -91,34 +91,64 @@ NDISASM.LNK: makefile.wc
echo F nasmlib.$(OBJ) >> NDISASM.LNK
echo F insnsd.$(OBJ) >> NDISASM.LNK
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
clean :
del *.obj
del *.lnk
del nasm.exe
del ndisasm.exe
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/Makefile.wcw b/Mkfiles/Makefile.wcw
index 9e92311..4bc1cdd 100644
--- a/Mkfiles/Makefile.wcw
+++ b/Mkfiles/Makefile.wcw
@@ -91,34 +91,64 @@ NDISASM.LNK: makefile.wcw
echo F nasmlib.$(OBJ) >> NDISASM.LNK
echo F insnsd.$(OBJ) >> NDISASM.LNK
-assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h version.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
- listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
-parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
-sync.$(OBJ): sync.c sync.h
-
clean :
del *.obj
del *.lnk
del nasm.exe
del ndisasm.exe
+#-- Magic hints to mkdep.pl --#
+# @object-ending: ".$(OBJ)"
+# @path-separator: "/"
+#-- Everything below is generated by mkdep.pl - do not edit --#
+assemble.$(OBJ): assemble.c insns.h assemble.h regvals.c nasm.h regs.h \
+ insnsi.h nasmlib.h version.h
+disasm.$(OBJ): disasm.c insns.h regs.c sync.h names.c nasm.h disasm.h regs.h \
+ insnsn.c insnsi.h version.h regdis.c
+eval.$(OBJ): eval.c nasm.h regs.h labels.h insnsi.h nasmlib.h version.h \
+ eval.h
+float.$(OBJ): float.c nasm.h regs.h insnsi.h version.h
+insnsa.$(OBJ): insnsa.c insns.h nasm.h regs.h insnsi.h version.h
+insnsd.$(OBJ): insnsd.c insns.h nasm.h regs.h insnsi.h version.h
+insnsn.$(OBJ): insnsn.c
+labels.$(OBJ): labels.c nasm.h regs.h insnsi.h nasmlib.h version.h
+listing.$(OBJ): listing.c listing.h nasm.h regs.h insnsi.h nasmlib.h \
+ version.h
+macros.$(OBJ): macros.c
+names.$(OBJ): names.c regs.c insnsn.c
+nasm.$(OBJ): nasm.c listing.h preproc.h insns.h outform.h assemble.h \
+ parser.h nasm.h regs.h labels.h insnsi.h nasmlib.h version.h eval.h
+nasmlib.$(OBJ): nasmlib.c regs.c names.c nasm.h regs.h insnsn.c insnsi.h \
+ nasmlib.h version.h
+ndisasm.$(OBJ): ndisasm.c insns.h sync.h nasm.h disasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+outform.$(OBJ): outform.c outform.h nasm.h regs.h insnsi.h version.h
+output/outaout.$(OBJ): output/outaout.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outas86.$(OBJ): output/outas86.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outbin.$(OBJ): output/outbin.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outcoff.$(OBJ): output/outcoff.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outdbg.$(OBJ): output/outdbg.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outelf.$(OBJ): output/outelf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outieee.$(OBJ): output/outieee.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outobj.$(OBJ): output/outobj.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf.$(OBJ): output/outrdf.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+output/outrdf2.$(OBJ): output/outrdf2.c outform.h nasm.h regs.h insnsi.h \
+ nasmlib.h version.h
+parser.$(OBJ): parser.c parser.h nasm.h regs.h insnsi.h regflags.c float.h \
+ nasmlib.h version.h
+preproc.$(OBJ): preproc.c nasm.h macros.c regs.h insnsi.h nasmlib.h \
+ version.h
+regdis.$(OBJ): regdis.c
+regflags.$(OBJ): regflags.c
+regs.$(OBJ): regs.c
+regvals.$(OBJ): regvals.c
+sync.$(OBJ): sync.c sync.h
diff --git a/Mkfiles/README b/Mkfiles/README
index 33dc7f7..471928b 100644
--- a/Mkfiles/README
+++ b/Mkfiles/README
@@ -15,15 +15,15 @@ The Makefiles are:
Filename Target Compiler Notes
---------------------------------------------------------------------------
- Makefile.b32 Win32 Borland C++
- Makefile.bc3 16-bit DOS Borland C++ OK as of NASM 0.98.31
- Makefile.bor 16-bit DOS Turbo C probably obsolete
- Makefile.dj 32-bit DOS DJGPP OK as of NASM 0.98.31
- Makefile.djo 32-bit DOS DJGPP "Opus Make" version
- Makefile.dl 32-bit DOS cc386 cc386 by David Lindauer
- Makefile.dos 16-bit DOS MSC 5 probably obsolete
+ Makefile.b32 Win32 Borland C++
+ Makefile.bc3 16-bit DOS Borland C++ OK as of NASM 0.98.34
+ Makefile.bor 16-bit DOS Turbo C (**)
+ Makefile.dj 32-bit DOS DJGPP OK as of NASM 0.98.31
+ Makefile.djo 32-bit DOS DJGPP "Opus Make" version(**)
+ Makefile.dl 32-bit DOS cc386 cc386 by David Lindauer
+ Makefile.dos 16-bit DOS MSC 5 (**)
Makefile.ms7 16-bit DOS MSC 7 OK as of NASM 0.98.31
- Makefile.os2 OS/2 Warp Borland C++
+ Makefile.os2 OS/2 Warp Borland C++ (**)
Makefile.sc 32-bit DOS Symantec C++ 7
Makefile.scw Win32 Symantec C++ 7
Makefile.unx Unix Any(*) use only if "configure" fails
@@ -36,3 +36,5 @@ The Makefiles are:
arguments, such as -c and -O. Pre-ANSI compilers, such as the
"cc" distributed with SunOS 4.x, will not work.
+(**) = Probably obsolete, needs updating.
+
diff --git a/assemble.c b/assemble.c
index 9f55759..e30be18 100644
--- a/assemble.c
+++ b/assemble.c
@@ -372,6 +372,10 @@ long assemble (long segment, long offset, int bits, unsigned long cp,
case R_FS: c = 0x64; break;
case R_GS: c = 0x65; break;
case R_SS: c = 0x36; break;
+ case R_SEGR6:
+ case R_SEGR7:
+ error (ERR_NONFATAL, "segr6 and segr7 cannot be used as prefixes");
+ break;
case P_A16:
if (bits != 16)
c = 0x67;
@@ -1103,37 +1107,14 @@ static void gencode (long segment, long offset, int bits,
}
}
+#include "regvals.c"
+
static int regval (operand *o)
{
- switch (o->basereg) {
- case R_EAX: case R_AX: case R_AL: case R_ES: case R_CR0: case R_DR0:
- case R_ST0: case R_MM0: case R_XMM0:
- return 0;
- case R_ECX: case R_CX: case R_CL: case R_CS: case R_DR1: case R_ST1:
- case R_MM1: case R_XMM1:
- return 1;
- case R_EDX: case R_DX: case R_DL: case R_SS: case R_CR2: case R_DR2:
- case R_ST2: case R_MM2: case R_XMM2:
- return 2;
- case R_EBX: case R_BX: case R_BL: case R_DS: case R_CR3: case R_DR3:
- case R_TR3: case R_ST3: case R_MM3: case R_XMM3:
- return 3;
- case R_ESP: case R_SP: case R_AH: case R_FS: case R_CR4: case R_TR4:
- case R_ST4: case R_MM4: case R_XMM4:
- return 4;
- case R_EBP: case R_BP: case R_CH: case R_GS: case R_TR5: case R_ST5:
- case R_MM5: case R_XMM5:
- return 5;
- case R_ESI: case R_SI: case R_DH: case R_DR6: case R_TR6: case R_ST6:
- case R_MM6: case R_XMM6:
- return 6;
- case R_EDI: case R_DI: case R_BH: case R_DR7: case R_TR7: case R_ST7:
- case R_MM7: case R_XMM7:
- return 7;
- default: /* panic */
- errfunc (ERR_PANIC, "invalid register operand given to regval()");
- return 0;
+ if ( o->basereg < EXPR_REG_START || o->basereg >= REG_ENUM_LIMIT ) {
+ errfunc (ERR_PANIC, "invalid operand passed to regval()");
}
+ return regvals[o->basereg];
}
static int matches (struct itemplate *itemp, insn *instruction)
diff --git a/disasm.c b/disasm.c
index f993427..24a2ab7 100644
--- a/disasm.c
+++ b/disasm.c
@@ -35,26 +35,7 @@ extern struct itemplate **itable[];
static int whichreg(long regflags, int regval)
{
- static int reg32[] = {
- R_EAX, R_ECX, R_EDX, R_EBX, R_ESP, R_EBP, R_ESI, R_EDI };
- static int reg16[] = {
- R_AX, R_CX, R_DX, R_BX, R_SP, R_BP, R_SI, R_DI };
- static int reg8[] = {
- R_AL, R_CL, R_DL, R_BL, R_AH, R_CH, R_DH, R_BH };
- static int sreg[] = {
- R_ES, R_CS, R_SS, R_DS, R_FS, R_GS, 0, 0 };
- static int creg[] = {
- R_CR0, 0, R_CR2, R_CR3, R_CR4, 0, 0, 0 };
- static int dreg[] = {
- R_DR0, R_DR1, R_DR2, R_DR3, 0, 0, R_DR6, R_DR7 };
- static int treg[] = {
- 0, 0, 0, R_TR3, R_TR4, R_TR5, R_TR6, R_TR7 };
- static int fpureg[] = {
- R_ST0, R_ST1, R_ST2, R_ST3, R_ST4, R_ST5, R_ST6, R_ST7 };
- static int mmxreg[] = {
- R_MM0, R_MM1, R_MM2, R_MM3, R_MM4, R_MM5, R_MM6, R_MM7 };
- static int xmmreg[] = {
- R_XMM0, R_XMM1, R_XMM2, R_XMM3, R_XMM4, R_XMM5, R_XMM6, R_XMM7 };
+#include "regdis.c"
if (!(REG_AL & ~regflags))
return R_AL;
@@ -70,16 +51,21 @@ static int whichreg(long regflags, int regval)
return R_CX;
if (!(REG_ECX & ~regflags))
return R_ECX;
- if (!(REG_CR4 & ~regflags))
- return R_CR4;
if (!(FPU0 & ~regflags))
return R_ST0;
if (!(REG_CS & ~regflags))
- return R_CS;
+ return (regval == 1) ? R_CS : 0;
if (!(REG_DESS & ~regflags))
return (regval == 0 || regval == 2 || regval == 3 ? sreg[regval] : 0);
if (!(REG_FSGS & ~regflags))
return (regval == 4 || regval == 5 ? sreg[regval] : 0);
+ if (!(REG_SEG67 & ~regflags))
+ return (regval == 6 || regval == 7 ? sreg[regval] : 0);
+
+ /* All the entries below look up regval in an 8-entry array */
+ if (regval < 0 || regval > 7)
+ return 0;
+
if (!((REGMEM|BITS8) & ~regflags))
return reg8[regval];
if (!((REGMEM|BITS16) & ~regflags))
@@ -100,6 +86,7 @@ static int whichreg(long regflags, int regval)
return mmxreg[regval];
if (!(XMMREG & ~regflags))
return xmmreg[regval];
+
return 0;
}
diff --git a/insns.dat b/insns.dat
index 172d72b..04e550b 100644
--- a/insns.dat
+++ b/insns.dat
@@ -562,33 +562,22 @@ LSS reg16,mem \320\301\2\x0F\xB2\110 386
LSS reg32,mem \321\301\2\x0F\xB2\110 386
LTR mem \300\1\x0F\17\203 286,PROT,PRIV
LTR mem16 \300\1\x0F\17\203 286,PROT,PRIV
-LTR reg16 \300\1\x0F\17\203 286,PROT,PRIV
-MOV mem,reg_cs \300\1\x8C\201 8086,SM
-MOV mem,reg_dess \300\1\x8C\101 8086,SM
-MOV mem,reg_fsgs \300\1\x8C\101 386,SM
-MOV reg16,reg_cs \320\300\1\x8C\201 8086
-MOV reg16,reg_dess \320\300\1\x8C\101 8086
-MOV reg16,reg_fsgs \320\300\1\x8C\101 386
-MOV reg32,reg_cs \321\300\1\x8C\201 386
-MOV reg32,reg_dess \321\300\1\x8C\101 386
-MOV reg32,reg_fsgs \321\300\1\x8C\101 386
-MOV reg_dess,mem \301\1\x8E\110 8086,SM
-MOV reg_fsgs,mem \301\1\x8E\110 386,SM
-MOV reg_dess,reg16 \301\1\x8E\110 8086
-MOV reg_fsgs,reg16 \301\1\x8E\110 386
-MOV reg_dess,reg32 \301\1\x8E\110 386
-MOV reg_fsgs,reg32 \301\1\x8E\110 386
+LTR reg16 \1\x0F\17\203 286,PROT,PRIV
+MOV mem,reg_sreg \300\1\x8C\101 8086,SM
+MOV reg16,reg_sreg \320\1\x8C\101 8086
+MOV reg32,reg_sreg \321\1\x8C\101 386
+MOV reg_sreg,mem \301\1\x8E\110 8086,SM
+MOV reg_sreg,reg16 \1\x8E\110 8086
+MOV reg_sreg,reg32 \1\x8E\110 386
MOV reg_al,mem_offs \301\1\xA0\45 8086,SM
MOV reg_ax,mem_offs \301\320\1\xA1\45 8086,SM
MOV reg_eax,mem_offs \301\321\1\xA1\45 386,SM
MOV mem_offs,reg_al \300\1\xA2\44 8086,SM
MOV mem_offs,reg_ax \300\320\1\xA3\44 8086,SM
MOV mem_offs,reg_eax \300\321\1\xA3\44 386,SM
-MOV reg32,reg_cr4 \2\x0F\x20\204 PENT,PRIV
MOV reg32,reg_creg \2\x0F\x20\101 386,PRIV
MOV reg32,reg_dreg \2\x0F\x21\101 386,PRIV
MOV reg32,reg_treg \2\x0F\x24\101 386,PRIV
-MOV reg_cr4,reg32 \2\x0F\x22\214 PENT,PRIV
MOV reg_creg,reg32 \2\x0F\x22\110 386,PRIV
MOV reg_dreg,reg32 \2\x0F\x23\110 386,PRIV
MOV reg_treg,reg32 \2\x0F\x26\110 386,PRIV
@@ -845,8 +834,9 @@ PUSH reg16 \320\10\x50 8086
PUSH reg32 \321\10\x50 386
PUSH rm16 \320\300\1\xFF\206 8086
PUSH rm32 \321\300\1\xFF\206 386
+PUSH reg_cs \6 8086
+PUSH reg_dess \6 8086
PUSH reg_fsgs \1\x0F\7 386
-PUSH reg_sreg \6 8086
PUSH imm8 \1\x6A\14 186
PUSH sbyte \1\x6A\14 186,ND
PUSH imm16 \320\133\1\x68\130 186
diff --git a/names.c b/names.c
index 26fb22e..97767b0 100644
--- a/names.c
+++ b/names.c
@@ -7,22 +7,14 @@
* distributed in the NASM archive.
*/
-static const char *reg_names[] = { /* register names, as strings */
- "ah", "al", "ax", "bh", "bl", "bp", "bx", "ch", "cl",
- "cr0", "cr2", "cr3", "cr4", "cs", "cx", "dh", "di", "dl", "dr0",
- "dr1", "dr2", "dr3", "dr6", "dr7", "ds", "dx", "eax", "ebp",
- "ebx", "ecx", "edi", "edx", "es", "esi", "esp", "fs", "gs",
- "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", "si",
- "sp", "ss", "st0", "st1", "st2", "st3", "st4", "st5", "st6",
- "st7", "tr3", "tr4", "tr5", "tr6", "tr7",
- "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
-};
-
static const char *conditions[] = { /* condition code names */
"a", "ae", "b", "be", "c", "e", "g", "ge", "l", "le", "na", "nae",
"nb", "nbe", "nc", "ne", "ng", "nge", "nl", "nle", "no", "np",
"ns", "nz", "o", "p", "pe", "po", "s", "z"
};
+/* Register names automatically generated from regs.dat */
+#include "regs.c"
+
/* Instruction names automatically generated from insns.dat */
#include "insnsn.c"
diff --git a/nasm.h b/nasm.h
index fa5142b..c767348 100644
--- a/nasm.h
+++ b/nasm.h
@@ -414,9 +414,9 @@ enum {
#define REG_CS 0x01081002L /* CS */
#define REG_DESS 0x02081002L /* DS, ES, SS (non-CS 86 registers) */
#define REG_FSGS 0x04081002L /* FS, GS (386 extended registers) */
+#define REG_SEG67 0x08081002L /* Non-implemented segment registers */
#define REG_CDT 0x00101004L /* CRn, DRn and TRn */
#define REG_CREG 0x08101004L /* CRn */
-#define REG_CR4 0x08101404L /* CR4 (Pentium only) */
#define REG_DREG 0x10101004L /* DRn */
#define REG_TREG 0x20101004L /* TRn */
@@ -429,21 +429,8 @@ enum {
#define BYTENESS 0x40000000L /* so SBYTE == IMMEDIATE | BYTENESS */
#define SBYTE 0x40002000L /* for op r16/32,immediate instrs. */
-/*
- * Next, the codes returned from the parser, for registers and
- * instructions.
- */
-
-enum { /* register names */
- R_AH = EXPR_REG_START, R_AL, R_AX, R_BH, R_BL, R_BP, R_BX, R_CH,
- R_CL, R_CR0, R_CR2, R_CR3, R_CR4, R_CS, R_CX, R_DH, R_DI, R_DL,
- R_DR0, R_DR1, R_DR2, R_DR3, R_DR6, R_DR7, R_DS, R_DX, R_EAX,
- R_EBP, R_EBX, R_ECX, R_EDI, R_EDX, R_ES, R_ESI, R_ESP, R_FS,
- R_GS, R_MM0, R_MM1, R_MM2, R_MM3, R_MM4, R_MM5, R_MM6, R_MM7,
- R_SI, R_SP, R_SS, R_ST0, R_ST1, R_ST2, R_ST3, R_ST4, R_ST5,
- R_ST6, R_ST7, R_TR3, R_TR4, R_TR5, R_TR6, R_TR7,
- R_XMM0, R_XMM1, R_XMM2, R_XMM3, R_XMM4, R_XMM5, R_XMM6, R_XMM7, REG_ENUM_LIMIT
-};
+/* Register names automatically generated from regs.dat */
+#include "regs.h"
/* Instruction names automatically generated from insns.dat */
#include "insnsi.h"
diff --git a/parser.c b/parser.c
index 5ca49fa..2fe7bfb 100644
--- a/parser.c
+++ b/parser.c
@@ -23,18 +23,7 @@ extern int in_abs_seg; /* ABSOLUTE segment flag */
extern long abs_seg; /* ABSOLUTE segment */
extern long abs_offset; /* ABSOLUTE segment offset */
-static long reg_flags[] = { /* sizes and special flags */
- 0, REG8, REG_AL, REG_AX, REG8, REG8, REG16, REG16, REG8, REG_CL,
- REG_CREG, REG_CREG, REG_CREG, REG_CR4, REG_CS, REG_CX, REG8,
- REG16, REG8, REG_DREG, REG_DREG, REG_DREG, REG_DREG, REG_DREG,
- REG_DREG, REG_DESS, REG_DX, REG_EAX, REG32, REG32, REG_ECX,
- REG32, REG32, REG_DESS, REG32, REG32, REG_FSGS, REG_FSGS,
- MMXREG, MMXREG, MMXREG, MMXREG, MMXREG, MMXREG, MMXREG, MMXREG,
- REG16, REG16, REG_DESS, FPU0, FPUREG, FPUREG, FPUREG, FPUREG,
- FPUREG, FPUREG, FPUREG, REG_TREG, REG_TREG, REG_TREG, REG_TREG,
- REG_TREG,
- XMMREG, XMMREG, XMMREG, XMMREG, XMMREG, XMMREG, XMMREG, XMMREG
-};
+#include "regflags.c" /* List of register flags */
enum { /* special tokens */
S_BYTE, S_DWORD, S_FAR, S_LONG, S_NEAR, S_NOSPLIT, S_QWORD,
diff --git a/regs.dat b/regs.dat
new file mode 100644
index 0000000..c294a7b
--- /dev/null
+++ b/regs.dat
@@ -0,0 +1,68 @@
+# $Id$
+#
+# List of registers and their classes; classes are defined in nasm.h
+#
+# The columns are: register name, assembler class, disassembler class, regval
+# A * means the line should be repeated for each value from 0 to 7
+#
+
+# General-purpose registers
+al REG_AL reg8 0
+ah REG8 reg8 4
+ax REG_AX reg16 0
+eax REG_EAX reg32 0
+bl REG8 reg8 3
+bh REG8 reg8 7
+bx REG16 reg16 3
+ebx REG32 reg32 3
+cl REG_CL reg8 1
+ch REG8 reg8 5
+cx REG_CX reg16 1
+ecx REG_ECX reg32 1
+dl REG8 reg8 2
+dh REG8 reg8 6
+dx REG_DX reg16 2
+edx REG32 reg32 2
+sp REG16 reg16 4
+esp REG32 reg32 4
+bp REG16 reg16 5
+ebp REG32 reg32 5
+si REG16 reg16 6
+esi REG32 reg32 6
+di REG16 reg16 7
+edi REG32 reg32 7
+
+# Segment registers
+cs REG_CS sreg 1
+ds REG_DESS sreg 3
+es REG_DESS sreg 0
+ss REG_DESS sreg 2
+fs REG_FSGS sreg 4
+gs REG_FSGS sreg 5
+segr6 REG_SEG67 sreg 6
+segr7 REG_SEG67 sreg 7
+
+# Control registers
+cr* REG_CREG creg *
+
+# Debug registers
+dr* REG_DREG dreg *
+
+# Test registers
+tr* REG_TREG treg *
+
+# Floating-point registers
+st0 FPU0 fpureg 0
+st1 FPUREG fpureg 1
+st2 FPUREG fpureg 2
+st3 FPUREG fpureg 3
+st4 FPUREG fpureg 4
+st5 FPUREG fpureg 5
+st6 FPUREG fpureg 6
+st7 FPUREG fpureg 7
+
+# MMX registers
+mm* MMXREG mmxreg *
+
+# SSE registers
+xmm* XMMREG xmmreg *
diff --git a/regs.pl b/regs.pl
new file mode 100755
index 0000000..a4fe9aa
--- /dev/null
+++ b/regs.pl
@@ -0,0 +1,108 @@
+#!/usr/bin/perl
+# $Id$
+#
+# Read regs.dat and output regs.h and regs.c (included in names.c)
+#
+
+$nline = 0;
+
+sub process_line($) {
+ my($line) = @_;
+ my @v;
+
+ if ( $line !~ /^\s*(\S+)\s*(\S+)\s*(\S+)\s*([0-7])\s*$/ ) {
+ die "regs.dat:$nline: invalid input\n";
+ }
+ $reg = $1;
+ $aclass = $2;
+ $dclass = $3;
+ $regval = $4;
+
+ $regs{$reg} = $aclass;
+ $regvals{$reg} = $regval;
+
+ if ( !defined($disclass{$dclass}) ) {
+ $disclass{$dclass} = [(undef) x 8];
+ }
+
+ $disclass{$dclass}->[$regval] = $reg;
+}
+
+($fmt, $file) = @ARGV;
+
+%regs = ();
+%regvals = ();
+%disclass = ();
+open(REGS, "< ${file}") or die "$0: Cannot open $file\n";
+while ( defined($line = <REGS>) ) {
+ $nline++;
+
+ chomp $line;
+ $line =~ s/\s*(\#.*|)$//;
+
+ next if ( $line eq '' );
+
+ if ( $line =~ /\*/ ) {
+ for ( $i = 0 ; $i < 8 ; $i++ ) {
+ ($xline = $line) =~ s/\*/$i/g;
+ process_line($xline);
+ }
+ } else {
+ process_line($line);
+ }
+}
+close(REGS);
+
+if ( $fmt eq 'h' ) {
+ # Output regs.h
+ print "/* automatically generated from $file - do not edit */\n";
+ print "enum reg_enum {\n";
+ $attach = ' = EXPR_REG_START'; # EXPR_REG_START == 1
+ foreach $reg ( sort(keys(%regs)) ) {
+ print " R_\U${reg}\E${attach},\n";
+ $attach = ''; $ch = ',';
+ }
+ print " REG_ENUM_LIMIT\n";
+ print "};\n";
+} elsif ( $fmt eq 'c' ) {
+ # Output regs.c
+ print "/* automatically generated from $file - do not edit */\n";
+ print "static const char *reg_names[] = "; $ch = '{';
+ # This one has no dummy entry for 0
+ foreach $reg ( sort(keys(%regs)) ) {
+ print "$ch\n \"${reg}\"";
+ $ch = ',';
+ }
+ print "\n};\n";
+} elsif ( $fmt eq 'fc' ) {
+ # Output regflags.c
+ print "/* automatically generated from $file - do not edit */\n";
+ print "static const long reg_flags[] = {\n";
+ print " 0"; # Dummy entry for 0
+ foreach $reg ( sort(keys(%regs)) ) {
+ print ",\n ", $regs{$reg}; # Print the class of the register
+ }
+ print "\n};\n";
+} elsif ( $fmt eq 'vc' ) {
+ # Output regvals.c
+ print "/* automatically generated from $file - do not edit */\n";
+ print "static const int regvals[] = {\n";
+ print " -1"; # Dummy entry for 0
+ foreach $reg ( sort(keys(%regs)) ) {
+ print ",\n ", $regvals{$reg}; # Print the regval of the register
+ }
+ print "\n};\n";
+} elsif ( $fmt eq 'dc' ) {
+ # Output regdis.c
+ print "/* automatically generated from $file - do not edit */\n";
+ foreach $class ( sort(keys(%disclass)) ) {
+ printf "static const int %-8s[] = {", $class;
+ @foo = @{$disclass{$class}};
+ for ( $i = 0 ; $i < scalar(@foo) ; $i++ ) {
+ $foo[$i] = defined($foo[$i]) ? "R_\U$foo[$i]\E" : '0';
+ }
+ print join(',', @foo), "};\n";
+ }
+} else {
+ die "$0: Unknown output format\n";
+}