mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
Makefile: unbreak msvc.mak
With these changes msvc.mak works on Visual Studio 2022. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
@@ -120,8 +120,11 @@ PROGOBJ = $(NASM) $(NDISASM)
|
|||||||
PROGS = nasm$(X) ndisasm$(X)
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
# Files dependent on extracted warnings
|
# Files dependent on extracted warnings
|
||||||
|
# WARNTIMES is explicit to avoid breaking some apparently problematic make
|
||||||
|
# versions, e.g. Microsoft NMAKE
|
||||||
WARNOBJ = asm/warnings.$(O)
|
WARNOBJ = asm/warnings.$(O)
|
||||||
WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
|
WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
|
||||||
|
WARNTIMES = asm/warnings_c.h.time include/warnings.h.time doc/warnings.src.time
|
||||||
|
|
||||||
OUTPUTOBJ = \
|
OUTPUTOBJ = \
|
||||||
output/outform.$(O) output/outlib.$(O) \
|
output/outform.$(O) output/outlib.$(O) \
|
||||||
@@ -243,7 +246,6 @@ ndisasm$(X): $(NDISASM) $(MANIFEST) $(DISLIB) $(NASMLIB)
|
|||||||
$(DISLIB) $(NASMLIB) $(LIBS)
|
$(DISLIB) $(NASMLIB) $(LIBS)
|
||||||
|
|
||||||
# These are specific to certain Makefile syntaxes...
|
# These are specific to certain Makefile syntaxes...
|
||||||
WARNTIMES = $(WARNFILES:=.time)
|
|
||||||
WARNSRCS = $(ALLOBJ_W:.$(O)=.c)
|
WARNSRCS = $(ALLOBJ_W:.$(O)=.c)
|
||||||
|
|
||||||
# Make sure we have subdirectories set up...
|
# Make sure we have subdirectories set up...
|
||||||
|
@@ -18,29 +18,32 @@ exec_prefix = $(prefix)
|
|||||||
bindir = $(prefix)/bin
|
bindir = $(prefix)/bin
|
||||||
mandir = $(prefix)/man
|
mandir = $(prefix)/man
|
||||||
|
|
||||||
MANIFEST_FLAGS = /MANIFEST:EMBED /MANIFESTFILE:$(MANIFEST)
|
MANIFEST_FLAGS = /manifest:embed /manifestfile:$(MANIFEST)
|
||||||
|
|
||||||
!IF "$(DEBUG)" == "1"
|
!IF "$(DEBUG)" == "1"
|
||||||
CFLAGS = /Od /Zi
|
OPTFLAGS = /Od /Zi
|
||||||
LDFLAGS = /DEBUG
|
LDFLAGS = /debug
|
||||||
!ELSE
|
!ELSE
|
||||||
CFLAGS = /O2 /Zi
|
CFLAGS = /O2 /Zi
|
||||||
# /OPT:REF and /OPT:ICF two undo /DEBUG harm
|
# /OPT:REF and /OPT:ICF two undo /DEBUG harm
|
||||||
LDFLAGS = /DEBUG /OPT:REF /OPT:ICF
|
LDFLAGS = /debug /opt:ref /opt:icf
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
CC = cl
|
CC = cl
|
||||||
AR = lib
|
AR = lib
|
||||||
|
ARFLAGS = /nologo
|
||||||
|
|
||||||
BUILD_CFLAGS = $(CFLAGS) /W2
|
BUILD_CFLAGS = $(CFLAGS) /W2
|
||||||
INTERNAL_CFLAGS = /I$(srcdir) /I. \
|
INTERNAL_CFLAGS = /I$(srcdir) /I. \
|
||||||
/I$(srcdir)/include /I./include \
|
/I$(srcdir)/include /I./include \
|
||||||
/I$(srcdir)/x86 /I./x86 \
|
/I$(srcdir)/x86 /I./x86 \
|
||||||
/I$(srcdir)/asm /I./asm \
|
/I$(srcdir)/asm /I./asm \
|
||||||
/I$(srcdir)/disasm /I./disasm \
|
/I$(srcdir)/disasm /I./disasm \
|
||||||
/I$(srcdir)/output /I./output
|
/I$(srcdir)/output /I./output \
|
||||||
|
/I$(srcdir)/zlib
|
||||||
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
|
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
|
||||||
MANIFEST_FLAGS = /MANIFEST:EMBED /MANIFESTINPUT:$(MANIFEST)
|
MANIFEST_FLAGS = /manifest:embed /manifestinput:$(MANIFEST)
|
||||||
ALL_LDFLAGS = /link $(LDFLAGS) $(MANIFEST_FLAGS) /SUBSYSTEM:CONSOLE /RELEASE
|
ALL_LDFLAGS = /link $(LDFLAGS) $(MANIFEST_FLAGS) /subsystem:console /release
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
PERL = perl
|
PERL = perl
|
||||||
@@ -60,7 +63,7 @@ X = .exe
|
|||||||
.SUFFIXES: $(X) .$(A) .obj .c .i .s .1 .man
|
.SUFFIXES: $(X) .$(A) .obj .c .i .s .1 .man
|
||||||
|
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) /c $(ALL_CFLAGS) /Fo$@ $<
|
$(CC) /c $(ALL_CFLAGS) /Fo:$@ $<
|
||||||
|
|
||||||
MANIFEST = win/manifest.xml
|
MANIFEST = win/manifest.xml
|
||||||
|
|
||||||
@@ -77,8 +80,11 @@ PROGOBJ = $(NASM) $(NDISASM)
|
|||||||
PROGS = nasm$(X) ndisasm$(X)
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
# Files dependent on extracted warnings
|
# Files dependent on extracted warnings
|
||||||
|
# WARNTIMES is explicit to avoid breaking some apparently problematic make
|
||||||
|
# versions, e.g. Microsoft NMAKE
|
||||||
WARNOBJ = asm\warnings.obj
|
WARNOBJ = asm\warnings.obj
|
||||||
WARNFILES = asm\warnings_c.h include\warnings.h doc\warnings.src
|
WARNFILES = asm\warnings_c.h include\warnings.h doc\warnings.src
|
||||||
|
WARNTIMES = asm\warnings_c.h.time include\warnings.h.time doc\warnings.src.time
|
||||||
|
|
||||||
OUTPUTOBJ = \
|
OUTPUTOBJ = \
|
||||||
output\outform.obj output\outlib.obj \
|
output\outform.obj output\outlib.obj \
|
||||||
@@ -178,20 +184,19 @@ NDISLIB = libndis.$(A)
|
|||||||
all: nasm$(X) ndisasm$(X)
|
all: nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
nasm$(X): $(NASM) $(MANIFEST) $(NASMLIB)
|
nasm$(X): $(NASM) $(MANIFEST) $(NASMLIB)
|
||||||
$(CC) /Fe$@ $(NASM) $(ALL_LDFLAGS) $(NASMLIB) $(LIBS)
|
$(CC) /Fe:$@ $(NASM) $(NASMLIB) $(LIBS) $(ALL_LDFLAGS)
|
||||||
|
|
||||||
ndisasm$(X): $(NDISASM) $(MANIFEST) $(NDISLIB) $(NASMLIB)
|
ndisasm$(X): $(NDISASM) $(MANIFEST) $(NDISLIB) $(NASMLIB)
|
||||||
$(CC) /Fe$@ $(NDISASM) $(ALL_LDFLAGS) $(NDISLIB) $(NASMLIB) $(LIBS)
|
$(CC) /Fe:$@ $(NDISASM) $(NDISLIB) $(NASMLIB) $(LIBS) $(ALL_LDFLAGS)
|
||||||
|
|
||||||
$(NASMLIB): $(LIBOBJ)
|
$(NASMLIB): $(LIBOBJ)
|
||||||
$(AR) $(ARFLAGS) /OUT:$@ $**
|
$(AR) $(ARFLAGS) /out:$@ $**
|
||||||
|
|
||||||
$(NDISLIB): $(LIBOBJ_DIS)
|
$(NDISLIB): $(LIBOBJ_DIS)
|
||||||
$(AR) $(ARFLAGS) /OUT:$@ $**
|
$(AR) $(ARFLAGS) /out:$@ $**
|
||||||
|
|
||||||
# These are specific to certain Makefile syntaxes...
|
# These are specific to certain Makefile syntaxes...
|
||||||
WARNTIMES = $(patsubst %,%.time,$(WARNFILES))
|
WARNSRCS = $(LIBOBJ_NW:.c=.obj)
|
||||||
WARNSRCS = $(patsubst %.obj,%.c,$(LIBOBJ_NW))
|
|
||||||
|
|
||||||
#-- Begin Generated File Rules --#
|
#-- Begin Generated File Rules --#
|
||||||
# Edit in Makefile.in, not here!
|
# Edit in Makefile.in, not here!
|
||||||
|
@@ -65,8 +65,11 @@ PROGOBJ = $(NASM) $(NDISASM)
|
|||||||
PROGS = nasm$(X) ndisasm$(X)
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
# Files dependent on extracted warnings
|
# Files dependent on extracted warnings
|
||||||
|
# WARNTIMES is explicit to avoid breaking some apparently problematic make
|
||||||
|
# versions, e.g. Microsoft NMAKE
|
||||||
WARNOBJ = asm\warnings.obj
|
WARNOBJ = asm\warnings.obj
|
||||||
WARNFILES = asm\warnings_c.h include\warnings.h doc\warnings.src
|
WARNFILES = asm\warnings_c.h include\warnings.h doc\warnings.src
|
||||||
|
WARNTIMES = asm\warnings_c.h.time include\warnings.h.time doc\warnings.src.time
|
||||||
|
|
||||||
OUTPUTOBJ = &
|
OUTPUTOBJ = &
|
||||||
output\outform.obj output\outlib.obj &
|
output\outform.obj output\outlib.obj &
|
||||||
|
Reference in New Issue
Block a user