mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Makefile changes:
- Changed INLINE to map to "static inline" - (Windows only) Made -static-libgcc standard for both 32-bit and 64-bit - (Windows only) Some fixes for MSVC builds
This commit is contained in:
parent
b71ecca85e
commit
5885e973db
2
makefile
2
makefile
@ -255,7 +255,7 @@ DEFS = -DCRLF=3
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# map the INLINE to something digestible by GCC
|
# map the INLINE to something digestible by GCC
|
||||||
DEFS += -DINLINE=inline
|
DEFS += -DINLINE="static inline"
|
||||||
|
|
||||||
# define LSB_FIRST if we are a little-endian target
|
# define LSB_FIRST if we are a little-endian target
|
||||||
ifndef BIGENDIAN
|
ifndef BIGENDIAN
|
||||||
|
@ -108,6 +108,7 @@ endif
|
|||||||
ifdef MSVC_BUILD
|
ifdef MSVC_BUILD
|
||||||
|
|
||||||
VCONV = $(WINOBJ)/vconv$(EXE)
|
VCONV = $(WINOBJ)/vconv$(EXE)
|
||||||
|
VCONVPREFIX = $(subst /,\,$(VCONV))
|
||||||
|
|
||||||
# append a 'v' prefix if nothing specified
|
# append a 'v' prefix if nothing specified
|
||||||
ifndef PREFIX
|
ifndef PREFIX
|
||||||
@ -115,10 +116,10 @@ PREFIX = v
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# replace the various compilers with vconv.exe prefixes
|
# replace the various compilers with vconv.exe prefixes
|
||||||
CC = @$(VCONV) gcc -I.
|
CC = @$(VCONVPREFIX) gcc -I.
|
||||||
LD = @$(VCONV) ld /profile
|
LD = @$(VCONVPREFIX) ld /profile
|
||||||
AR = @$(VCONV) ar
|
AR = @$(VCONVPREFIX) ar
|
||||||
RC = @$(VCONV) windres
|
RC = @$(VCONVPREFIX) windres
|
||||||
|
|
||||||
# make sure we use the multithreaded runtime
|
# make sure we use the multithreaded runtime
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
@ -140,6 +141,9 @@ CCOMFLAGS += /wd4267
|
|||||||
LIBS += -lbufferoverflowu
|
LIBS += -lbufferoverflowu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# enable exception handling for C++
|
||||||
|
CPPONLYFLAGS += /EHsc
|
||||||
|
|
||||||
# disable function pointer warnings in C++ which are evil to work around
|
# disable function pointer warnings in C++ which are evil to work around
|
||||||
CPPONLYFLAGS += /wd4191 /wd4060 /wd4065 /wd4640
|
CPPONLYFLAGS += /wd4191 /wd4060 /wd4065 /wd4640
|
||||||
|
|
||||||
@ -147,7 +151,7 @@ CPPONLYFLAGS += /wd4191 /wd4060 /wd4065 /wd4640
|
|||||||
LDFLAGS += /ENTRY:wmainCRTStartup
|
LDFLAGS += /ENTRY:wmainCRTStartup
|
||||||
|
|
||||||
# add some VC++-specific defines
|
# add some VC++-specific defines
|
||||||
DEFS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf
|
DEFS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DXML_STATIC -Dsnprintf=_snprintf
|
||||||
|
|
||||||
# make msvcprep into a pre-build step
|
# make msvcprep into a pre-build step
|
||||||
OSPREBUILD = $(VCONV)
|
OSPREBUILD = $(VCONV)
|
||||||
@ -217,9 +221,11 @@ CCOMFLAGS += -include $(WINSRC)/winprefix.h
|
|||||||
# for 32-bit apps, add unicows for Unicode support on Win9x
|
# for 32-bit apps, add unicows for Unicode support on Win9x
|
||||||
ifndef PTR64
|
ifndef PTR64
|
||||||
LIBS += -lunicows
|
LIBS += -lunicows
|
||||||
LDFLAGS += -static-libgcc
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# ensure we statically link the gcc runtime lib
|
||||||
|
LDFLAGS += -static-libgcc
|
||||||
|
|
||||||
# add the windows libraries
|
# add the windows libraries
|
||||||
LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi -ldinput8
|
LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi -ldinput8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user