aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-06-18 13:50:25 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2018-06-18 13:54:43 -0700
commit5d8193367e638092f35f5e54128795329f42a746 (patch)
treeda09ed568973f3f311ffb1b6bd959e93180885ca /Makefile.in
parentef4e5e209fd1ad9e2ffff9112a66bb2b73225d8f (diff)
downloadnasm-5d8193367e638092f35f5e54128795329f42a746.tar.gz
nasm-5d8193367e638092f35f5e54128795329f42a746.tar.xz
nasm-5d8193367e638092f35f5e54128795329f42a746.zip
MSVC: fix dependency generation and building RDOFF under MSVC
1. The mkdep.pl program didn't handle excluded dependencies correctly, causing it to error out due to config/config.h not existing. 2. NMAKE is sensitive to the order suffixes appear in .SUFFIXES, causing it to try to use the builtin rule .c.exe instead of .c.obj -> .obj.exe. 3. NMAKE doesn't handle the && operator between commands. 4. The !ifdef jungle around dependency generation was wrong. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in33
1 files changed, 16 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in
index 9a8e2def..0943f39e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,7 +50,7 @@ XMLTO = @XMLTO@
MAKENSIS = makensis
-MKDIR = mkdir
+MKDIR = mkdir -p
RM_F = rm -f
RM_RF = rm -rf
LN_S = @LN_S@
@@ -277,6 +277,13 @@ asm/directbl.c: asm/directiv.dat nasmlib/perfhash.pl perllib/phash.ph
perlreq: $(PERLREQ)
+# This rule is only used for RDOFF
+.$(O)$(X):
+ $(CC) $(ALL_CFLAGS) -o $@ $< $(LDFLAGS) $(RDFLIB) $(NASMLIB) $(LIBS)
+
+RDFLN = cd rdoff && ln -s
+RDFLNPFX =
+
#-- Begin RDOFF Shared Rules --#
RDFLIBOBJ = rdoff/rdoff.$(O) rdoff/rdfload.$(O) rdoff/symtab.$(O) \
@@ -291,31 +298,23 @@ RDF2BINLINKS = rdoff/rdf2com$(X) rdoff/rdf2ith$(X) \
RDFLIB = rdoff/librdoff.$(A)
RDFLIBS = $(RDFLIB) $(NASMLIB)
-# This rule is only used for rdoff, to allow common rules
-MAKERDF = $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $< $(RDFLIB) $(NASMLIB) $(LIBS)
-
rdoff/rdfdump$(X): rdoff/rdfdump.$(O) $(RDFLIBS)
- $(MAKERDF)
rdoff/ldrdf$(X): rdoff/ldrdf.$(O) $(RDFLIBS)
- $(MAKERDF)
rdoff/rdx$(X): rdoff/rdx.$(O) $(RDFLIBS)
- $(MAKERDF)
rdoff/rdflib$(X): rdoff/rdflib.$(O) $(RDFLIBS)
- $(MAKERDF)
rdoff/rdf2bin$(X): rdoff/rdf2bin.$(O) $(RDFLIBS)
- $(MAKERDF)
rdoff/rdf2com$(X): rdoff/rdf2bin$(X)
$(RM_F) rdoff/rdf2com$(X)
- cd rdoff && $(LN_S) rdf2bin$(X) rdf2com$(X)
+ $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2com$(X)
rdoff/rdf2ith$(X): rdoff/rdf2bin$(X)
$(RM_F) rdoff/rdf2ith$(X)
- cd rdoff && $(LN_S) rdf2bin$(X) rdf2ith$(X)
+ $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2ith$(X)
rdoff/rdf2ihx$(X): rdoff/rdf2bin$(X)
$(RM_F) rdoff/rdf2ihx$(X)
- cd rdoff && $(LN_S) rdf2bin$(X) rdf2ihx$(X)
+ $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2ihx$(X)
rdoff/rdf2srec$(X): rdoff/rdf2bin$(X)
$(RM_F) rdoff/rdf2srec$(X)
- cd rdoff && $(LN_S) rdf2bin$(X) rdf2srec$(X)
+ $(RDFLN) $(RDFLNPFX)rdf2bin$(X) $(RDFLNPFX)rdf2srec$(X)
#-- End RDOFF Shared Rules --#
@@ -345,10 +344,10 @@ nsis: nsis/nasm.nsi nsis/arch.nsh nsis/version.nsh
manpages: nasm.1 ndisasm.1
install: nasm$(X) ndisasm$(X)
- $(MKDIR) -p $(DESTDIR)$(bindir)
+ $(MKDIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X)
$(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X)
- $(MKDIR) -p $(DESTDIR)$(mandir)/man1
+ $(MKDIR) $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
@@ -397,7 +396,7 @@ cscope:
cscope -b -f cscope.out
rdf_install install_rdf install_rdoff:
- $(MKDIR) -p $(DESTDIR)$(bindir)
+ $(MKDIR) $(DESTDIR)$(bindir)
for f in $(RDFPROGS); do \
$(INSTALL_PROGRAM) "$$f" '$(DESTDIR)$(bindir)'/ ; \
done
@@ -406,7 +405,7 @@ rdf_install install_rdf install_rdoff:
bn=`basename "$$f"` && $(RM_F) "$$bn" && \
$(LN_S) rdf2bin$(X) "$$bn" ; \
done
- $(MKDIR) -p $(DESTDIR)$(mandir)/man1
+ $(MKDIR) $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) $(srcdir)/rdoff/*.1 $(DESTDIR)$(mandir)/man1/
doc: