Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port; Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX); Finished the 586MC1; Added 8087 emulation; Moved Cyrix 6x86'es to the Dev branch; Sanitized/cleaned up memregs.c/h and intel.c/h; Split the chipsets from machines and sanitized Port 92 emulation; Added support for the 15bpp mode to the Compaq ATI 28800; Moved the MR 386DX and 486 machines to the Dev branch; Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00; Ported the new timer code from PCem; Cleaned up the CPU table of unused stuff and better optimized its structure; Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch; Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem; Added the AHA-1540A and the BusTek BT-542B; Moved the Sumo SCSI-AT to the Dev branch; Minor IDE, FDC, and floppy drive code clean-ups; Made NCR 5380/53C400-based cards' BIOS address configurable; Got rid of the legacy romset variable; Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit; Added the Amstead PPC512 per PCem patch by John Elliott; Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages); Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing; Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem; Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit; Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement; Amstrad MegaPC does now works correctly with non-internal graphics card; The SLiRP code no longer casts a packed struct type to a non-packed struct type; The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present; The S3 Virge on BeOS is no longer broken (was broken by build #1591); OS/2 2.0 build 6.167 now sees key presses again; Xi8088 now work on CGA again; 86F images converted from either the old or new variants of the HxC MFM format now work correctly; Hardware interrupts with a vector of 0xFF are now handled correctly; OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct; Fixed VNC keyboard input bugs; Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver; Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly; Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4; Compaq Portable now works with all graphics cards; Fixed various MDSI Genius bugs; Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly; Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355; OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400. Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391. Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389. Fixed a minor IDE timing bug, fixes #388. Fixed Toshiba T1000 RAM issues, fixes #379. Fixed EGA/(S)VGA overscan border handling, fixes #378; Got rid of the now long useless IDE channel 2 auto-removal, fixes #370; Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366; Ported the Unicode CD image file name fix from VARCem, fixes #365; Fixed high density floppy disks on the Xi8088, fixes #359; Fixed some bugs in the Hercules emulation, fixes #346, fixes #358; Fixed the SCSI hard disk mode sense pages, fixes #356; Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349; Fixed bugs in the serial mouse emulation, fixes #344; Compiled 86Box binaries now include all the required .DLL's, fixes #341; Made some combo boxes in the Settings dialog slightly wider, fixes #276.
This commit is contained in:
848
src/win/Makefile_ndr.mingw
Normal file
848
src/win/Makefile_ndr.mingw
Normal file
@@ -0,0 +1,848 @@
|
||||
#
|
||||
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
# running old operating systems and software designed for IBM
|
||||
# PC systems and compatibles from 1981 through fairly recent
|
||||
# system designs based on the PCI bus.
|
||||
#
|
||||
# This file is part of the 86Box distribution.
|
||||
#
|
||||
# Makefile for Win32 (MinGW32) environment.
|
||||
#
|
||||
# Version: @(#)Makefile.mingw 1.0.137 2019/03/03
|
||||
#
|
||||
# Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
# Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
|
||||
# Various compile-time options.
|
||||
ifndef STUFF
|
||||
STUFF :=
|
||||
endif
|
||||
|
||||
# Add feature selections here.
|
||||
ifndef EXTRAS
|
||||
EXTRAS :=
|
||||
endif
|
||||
|
||||
ifndef DEV_BUILD
|
||||
DEV_BUILD := n
|
||||
endif
|
||||
ifndef FLTO
|
||||
FLTO := full
|
||||
endif
|
||||
|
||||
ifeq ($(DEV_BUILD), y)
|
||||
ifndef DEBUG
|
||||
DEBUG := y
|
||||
endif
|
||||
ifndef DEV_BRANCH
|
||||
DEV_BRANCH := y
|
||||
endif
|
||||
ifndef AMD_K
|
||||
AMD_K := y
|
||||
endif
|
||||
ifndef CRASHDUMP
|
||||
CRASHDUMP := y
|
||||
endif
|
||||
ifndef D2D
|
||||
D2D := y
|
||||
endif
|
||||
ifndef I686
|
||||
I686 := y
|
||||
endif
|
||||
ifndef LASERXT
|
||||
LASERXT := y
|
||||
endif
|
||||
ifndef MR495
|
||||
MR495 := y
|
||||
endif
|
||||
ifndef MRTHOR
|
||||
MRTHOR := y
|
||||
endif
|
||||
ifndef PAS16
|
||||
PAS16 := y
|
||||
endif
|
||||
ifndef PORTABLE3
|
||||
PORTABLE3 := y
|
||||
endif
|
||||
ifndef PS1M2133
|
||||
PS1M2133 := y
|
||||
endif
|
||||
ifndef PS2M70T4
|
||||
PS2M70T4 := y
|
||||
endif
|
||||
ifndef RIVA128
|
||||
RIVA128 := y
|
||||
endif
|
||||
ifndef TC430HX
|
||||
TC430HX := y
|
||||
endif
|
||||
ifndef VECTRA54
|
||||
VECTRA54 := y
|
||||
endif
|
||||
ifndef VGAWONDER
|
||||
VGAWONDER := y
|
||||
endif
|
||||
ifndef VNC
|
||||
VNC := y
|
||||
endif
|
||||
ifndef XL24
|
||||
XL24 := y
|
||||
endif
|
||||
else
|
||||
ifndef DEBUG
|
||||
DEBUG := n
|
||||
endif
|
||||
ifndef DEV_BRANCH
|
||||
DEV_BRANCH := n
|
||||
endif
|
||||
ifndef AMD_K
|
||||
AMD_K := n
|
||||
endif
|
||||
ifndef CRASHDUMP
|
||||
CRASHDUMP := n
|
||||
endif
|
||||
ifndef D2D
|
||||
D2D := n
|
||||
endif
|
||||
ifndef I686
|
||||
I686 := n
|
||||
endif
|
||||
ifndef LASERXT
|
||||
LASERXT := n
|
||||
endif
|
||||
ifndef MR495
|
||||
MR495 := n
|
||||
endif
|
||||
ifndef MRTHOR
|
||||
MRTHOR := n
|
||||
endif
|
||||
ifndef PAS16
|
||||
PAS16 := n
|
||||
endif
|
||||
ifndef PORTABLE3
|
||||
PORTABLE3 := n
|
||||
endif
|
||||
ifndef PS1M2133
|
||||
PS1M2133 := n
|
||||
endif
|
||||
ifndef PS2M70T4
|
||||
PS2M70T4 := n
|
||||
endif
|
||||
ifndef RIVA128
|
||||
RIVA128 := n
|
||||
endif
|
||||
ifndef TC430HX
|
||||
TC430HX := n
|
||||
endif
|
||||
ifndef VECTRA54
|
||||
VECTRA54 := n
|
||||
endif
|
||||
ifndef VGAWONDER
|
||||
VGAWONDER := n
|
||||
endif
|
||||
ifndef VNC
|
||||
VNC := n
|
||||
endif
|
||||
ifndef XL24
|
||||
XL24 := n
|
||||
endif
|
||||
endif
|
||||
|
||||
# Defaults for several build options (possibly defined in a chained file.)
|
||||
ifndef AUTODEP
|
||||
AUTODEP := n
|
||||
endif
|
||||
ifndef OPTIM
|
||||
OPTIM := n
|
||||
endif
|
||||
ifndef RELEASE
|
||||
RELEASE := n
|
||||
endif
|
||||
ifndef X64
|
||||
X64 := n
|
||||
endif
|
||||
ifndef ARM
|
||||
ARM := n
|
||||
endif
|
||||
ifndef ARM64
|
||||
ARM64 := n
|
||||
endif
|
||||
ifndef WX
|
||||
WX := n
|
||||
endif
|
||||
ifndef USB
|
||||
USB := n
|
||||
endif
|
||||
ifndef RDP
|
||||
RDP := n
|
||||
endif
|
||||
ifndef DINPUT
|
||||
DINPUT := n
|
||||
endif
|
||||
ifndef D3DX
|
||||
D3DX := y
|
||||
ifeq ($(ARM), y)
|
||||
D3DX := n
|
||||
endif
|
||||
ifeq ($(ARM64), y)
|
||||
D3DX := n
|
||||
endif
|
||||
endif
|
||||
ifndef OPENAL
|
||||
OPENAL := y
|
||||
endif
|
||||
ifndef FLUIDSYNTH
|
||||
FLUIDSYNTH := y
|
||||
endif
|
||||
ifndef MUNT
|
||||
MUNT := y
|
||||
endif
|
||||
ifndef DYNAREC
|
||||
DYNAREC := y
|
||||
ifeq ($(ARM), y)
|
||||
DYNAREC := n
|
||||
endif
|
||||
ifeq ($(ARM64), y)
|
||||
DYNAREC := n
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
ifndef PROG
|
||||
ifneq ($(WX), n)
|
||||
PROG := Wx86Box
|
||||
else
|
||||
PROG := 86Box
|
||||
endif
|
||||
endif
|
||||
|
||||
# WxWidgets basic info. Extract using the config program.
|
||||
ifneq ($(WX), n)
|
||||
EXPATH += wx
|
||||
WX_CONFIG := wx-config.exe
|
||||
ifeq ($(WX), y)
|
||||
WX_PATH := C:/MinGW32/WxWidgets
|
||||
WX_FLAGS := -I$(WX_PATH)/lib/wx/include/msw-unicode-3.0 \
|
||||
-I$(WX_PATH)/include/wx-3.0 \
|
||||
-D__WXMSW__ -DWX_PRECOMP -D_FILE_OFFSET_BITS=64 -pthread
|
||||
# -lwx_mswu_gl-3.0 -lwxtiff-3.0 -llzma
|
||||
WX_LIBS := -mwindows -mthreads -L$(WX_PATH)/lib \
|
||||
-lwx_mswu-3.0.dll \
|
||||
-lrpcrt4 -loleaut32 -lole32 -luuid \
|
||||
-lwinspool -lwinmm -lshell32 -lcomctl32 \
|
||||
-lcomdlg32 -ladvapi32 -lwsock32 -lgdi32
|
||||
endif
|
||||
ifeq ($(WX), static)
|
||||
WX_PATH := C:/MinGW32/WxWidgets
|
||||
WX_FLAGS := -I$(WX_PATH)/lib/wx/include/msw-unicode-3.0 \
|
||||
-I$(WX_PATH)/include/wx-3.0 \
|
||||
-D__WXMSW__ -DWX_PRECOMP -D_FILE_OFFSET_BITS=64 -pthread
|
||||
# -lwx_mswu_gl-3.0 -lwxtiff-3.0 -llzma
|
||||
WX_LIBS := -mwindows -mthreads -L$(WX_PATH)/lib \
|
||||
-lwx_mswu-3.0 -lwxscintilla-3.0 \
|
||||
-lwxjpeg-3.0 -lwxpng-3.0 -lwxzlib-3.0 \
|
||||
-lwxregexu-3.0 -lwxexpat-3.0 \
|
||||
-lrpcrt4 -loleaut32 -lole32 -luuid \
|
||||
-lwinspool -lwinmm -lshell32 -lcomctl32 \
|
||||
-lcomdlg32 -ladvapi32 -lwsock32 -lgdi32
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#########################################################################
|
||||
# Nothing should need changing from here on.. #
|
||||
#########################################################################
|
||||
VPATH := $(EXPATH) . cpu_new \
|
||||
cdrom chipset disk floppy game machine \
|
||||
printer \
|
||||
sound \
|
||||
sound/munt sound/munt/c_interface sound/munt/sha1 \
|
||||
sound/munt/srchelper \
|
||||
sound/resid-fp \
|
||||
scsi video network network/slirp win
|
||||
ifeq ($(X64), y)
|
||||
TOOL_PREFIX := x86_64-w64-mingw32-
|
||||
else
|
||||
TOOL_PREFIX := i686-w64-mingw32-
|
||||
endif
|
||||
CPP := ${TOOL_PREFIX}g++
|
||||
CC := ${TOOL_PREFIX}gcc
|
||||
WINDRES := windres
|
||||
STRIP := strip
|
||||
ifeq ($(ARM64), y)
|
||||
CPP := aarch64-w64-mingw32-g++
|
||||
CC := aarch64-w64-mingw32-gcc
|
||||
WINDRES := aarch64-w64-mingw32-windres
|
||||
STRIP := aarch64-w64-mingw32-strip
|
||||
endif
|
||||
ifeq ($(ARM), y)
|
||||
CPP := armv7-w64-mingw32-g++
|
||||
CC := armv7-w64-mingw32-gcc
|
||||
WINDRES := armv7-w64-mingw32-windres
|
||||
STRIP := armv7-w64-mingw32-strip
|
||||
endif
|
||||
DEPS = -MMD -MF $*.d -c $<
|
||||
DEPFILE := win/.depends
|
||||
|
||||
# Set up the correct toolchain flags.
|
||||
OPTS := $(EXTRAS) $(STUFF)
|
||||
ifdef EXFLAGS
|
||||
OPTS += $(EXFLAGS)
|
||||
endif
|
||||
ifdef EXINC
|
||||
OPTS += -I$(EXINC)
|
||||
endif
|
||||
ifeq ($(X64), y)
|
||||
ifeq ($(OPTIM), y)
|
||||
DFLAGS := -march=native
|
||||
else
|
||||
DFLAGS :=
|
||||
endif
|
||||
else
|
||||
ifeq ($(OPTIM), y)
|
||||
DFLAGS := -march=native
|
||||
else
|
||||
DFLAGS := -march=i686
|
||||
endif
|
||||
endif
|
||||
ifeq ($(DEBUG), y)
|
||||
DFLAGS += -ggdb -DDEBUG
|
||||
AOPTIM :=
|
||||
ifndef COPTIM
|
||||
COPTIM := -Og
|
||||
endif
|
||||
else
|
||||
DFLAGS += -g0
|
||||
ifeq ($(OPTIM), y)
|
||||
AOPTIM := -mtune=native
|
||||
ifndef COPTIM
|
||||
COPTIM := -O3 -flto=$(FLTO)
|
||||
endif
|
||||
else
|
||||
ifndef COPTIM
|
||||
COPTIM := -O3
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
AFLAGS := -msse2 -mfpmath=sse
|
||||
ifeq ($(ARM), y)
|
||||
DFLAGS := -march=armv7-a
|
||||
AOPTIM :=
|
||||
AFLAGS := -mfloat-abi=hard
|
||||
endif
|
||||
ifeq ($(ARM64), y)
|
||||
DFLAGS := -march=armv8-a
|
||||
AOPTIM :=
|
||||
AFLAGS := -mfloat-abi=hard
|
||||
endif
|
||||
RFLAGS := --input-format=rc -O coff
|
||||
OPTS += -DUSE_NEW_DYNAREC
|
||||
ifeq ($(RELEASE), y)
|
||||
OPTS += -DRELEASE_BUILD
|
||||
RFLAGS += -DRELEASE_BUILD
|
||||
endif
|
||||
ifeq ($(VRAMDUMP), y)
|
||||
OPTS += -DENABLE_VRAM_DUMP
|
||||
RFLAGS += -DENABLE_VRAM_DUMP
|
||||
endif
|
||||
|
||||
|
||||
# Optional modules.
|
||||
ifeq ($(DYNAREC), y)
|
||||
ifeq ($(X64), y)
|
||||
PLATCG := codegen_backend_x86-64.o codegen_backend_x86-64_ops.o codegen_backend_x86-64_ops_sse.o \
|
||||
codegen_backend_x86-64_uops.o
|
||||
else
|
||||
PLATCG := codegen_backend_x86.o codegen_backend_x86_ops.o codegen_backend_x86_ops_fpu.o codegen_backend_x86_ops_sse.o \
|
||||
codegen_backend_x86_uops.o
|
||||
endif
|
||||
|
||||
OPTS += -DUSE_DYNAREC
|
||||
RFLAGS += -DUSE_DYNAREC
|
||||
DYNARECOBJ := 386_dynarec_ops.o \
|
||||
codegen.o codegen_accumulate.o codegen_allocator.o codegen_block.o codegen_ir.o codegen_ops.o \
|
||||
codegen_ops_3dnow.o codegen_ops_branch.o codegen_ops_arith.o codegen_ops_fpu_arith.o \
|
||||
codegen_ops_fpu_constant.o codegen_ops_fpu_loadstore.o codegen_ops_fpu_misc.o codegen_ops_helpers.o codegen_ops_jump.o \
|
||||
codegen_ops_logic.o codegen_ops_misc.o codegen_ops_mmx_arith.o codegen_ops_mmx_cmp.o \
|
||||
codegen_ops_mmx_loadstore.o codegen_ops_mmx_logic.o codegen_ops_mmx_pack.o codegen_ops_mmx_shift.o \
|
||||
codegen_ops_mov.o codegen_ops_shift.o codegen_ops_stack.o codegen_reg.o codegen_timing_486.o \
|
||||
codegen_timing_686.o codegen_timing_common.o codegen_timing_k6.o codegen_timing_pentium.o \
|
||||
codegen_timing_winchip.o codegen_timing_winchip2.o $(PLATCG)
|
||||
endif
|
||||
|
||||
ifneq ($(WX), n)
|
||||
OPTS += -DUSE_WX $(WX_FLAGS)
|
||||
LIBS += $(WX_LIBS)
|
||||
UIOBJ := wx_main.o wx_ui.o wx_stbar.o wx_render.o
|
||||
else
|
||||
UIOBJ := win_ui.o win_stbar.o \
|
||||
win_ddraw.o win_d3d.o win_sdl.o \
|
||||
win_dialog.o win_about.o \
|
||||
win_settings.o win_devconf.o win_snd_gain.o \
|
||||
win_new_floppy.o win_jsconf.o
|
||||
endif
|
||||
|
||||
ifeq ($(OPENAL), y)
|
||||
OPTS += -DUSE_OPENAL
|
||||
endif
|
||||
ifeq ($(FLUIDSYNTH), y)
|
||||
OPTS += -DUSE_FLUIDSYNTH
|
||||
FSYNTHOBJ := midi_fluidsynth.o
|
||||
endif
|
||||
|
||||
ifeq ($(MUNT), y)
|
||||
OPTS += -DUSE_MUNT
|
||||
MUNTOBJ := midi_mt32.o \
|
||||
Analog.o BReverbModel.o File.o FileStream.o LA32Ramp.o \
|
||||
LA32FloatWaveGenerator.o LA32WaveGenerator.o \
|
||||
MidiStreamParser.o Part.o Partial.o PartialManager.o \
|
||||
Poly.o ROMInfo.o SampleRateConverter_dummy.o Synth.o \
|
||||
Tables.o TVA.o TVF.o TVP.o sha1.o c_interface.o
|
||||
endif
|
||||
|
||||
ifeq ($(D2D), y)
|
||||
OPTS += -DUSE_D2D
|
||||
RFLAGS += -DUSE_D2D
|
||||
D2DLIB := -ld2d1
|
||||
D2DOBJ := win_d2d.o
|
||||
endif
|
||||
|
||||
ifeq ($(VNC), y)
|
||||
OPTS += -DUSE_VNC
|
||||
RFLAGS += -DUSE_VNC
|
||||
ifneq ($(VNC_PATH), )
|
||||
OPTS += -I$(VNC_PATH)\INCLUDE
|
||||
VNCLIB := -L$(VNC_PATH)\LIB
|
||||
endif
|
||||
VNCLIB += -lvncserver
|
||||
VNCOBJ := vnc.o vnc_keymap.o
|
||||
endif
|
||||
|
||||
ifeq ($(RDP), y)
|
||||
OPTS += -DUSE_RDP
|
||||
RFLAGS += -DUSE_RDP
|
||||
ifneq ($(RDP_PATH), )
|
||||
OPTS += -I$(RDP_PATH)\INCLUDE
|
||||
RDPLIB := -L$(RDP_PATH)\LIB
|
||||
endif
|
||||
RDPLIB += -lrdp
|
||||
RDPOBJ := rdp.o
|
||||
endif
|
||||
|
||||
ifeq ($(DINPUT), y)
|
||||
OPTS += -DUSE_DINPUT
|
||||
endif
|
||||
|
||||
ifeq ($(D3DX), y)
|
||||
OPTS += -DUSE_D3DX
|
||||
endif
|
||||
|
||||
# Options for the DEV branch.
|
||||
ifeq ($(DEV_BRANCH), y)
|
||||
OPTS += -DDEV_BRANCH
|
||||
DEVBROBJ :=
|
||||
|
||||
ifeq ($(AMD_K), y)
|
||||
OPTS += -DUSE_AMD_K
|
||||
endif
|
||||
|
||||
ifeq ($(CRASHDUMPOBJ), y)
|
||||
OPTS += -DUSE_CRASHDUMP
|
||||
DEVBROBJ += win_crashdump.o
|
||||
endif
|
||||
|
||||
ifeq ($(I686), y)
|
||||
OPTS += -DUSE_I686
|
||||
DEVBROBJ += m_at_socket8.o
|
||||
endif
|
||||
|
||||
ifeq ($(LASERXT), y)
|
||||
OPTS += -DUSE_LASERXT
|
||||
DEVBROBJ += m_xt_laserxt.o
|
||||
endif
|
||||
|
||||
ifeq ($(MR495), y)
|
||||
OPTS += -DUSE_MR495
|
||||
endif
|
||||
|
||||
ifeq ($(MRTHOR), y)
|
||||
OPTS += -DUSE_MRTHOR
|
||||
endif
|
||||
|
||||
ifeq ($(PAS16), y)
|
||||
OPTS += -DUSE_PAS16
|
||||
DEVBROBJ += snd_pas16.o
|
||||
endif
|
||||
|
||||
ifeq ($(PORTABLE3), y)
|
||||
OPTS += -DUSE_PORTABLE3
|
||||
endif
|
||||
|
||||
ifeq ($(PS1M2133), y)
|
||||
OPTS += -DUSE_PS1M2133
|
||||
endif
|
||||
|
||||
ifeq ($(PS2M70T4), y)
|
||||
OPTS += -DUSE_PS2M70T4
|
||||
endif
|
||||
|
||||
ifeq ($(RIVA128), y)
|
||||
OPTS += -DUSE_RIVA128
|
||||
DEVBROBJ += vid_riva128.o
|
||||
endif
|
||||
|
||||
ifeq ($(TC430HX), y)
|
||||
OPTS += -DUSE_TC430HX
|
||||
endif
|
||||
|
||||
ifeq ($(VECTRA54), y)
|
||||
OPTS += -DUSE_VECTRA54
|
||||
endif
|
||||
|
||||
ifeq ($(VGAWONDER), y)
|
||||
OPTS += -DUSE_VGAWONDER
|
||||
endif
|
||||
|
||||
ifeq ($(XL24), y)
|
||||
OPTS += -DUSE_XL24
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# Options for works-in-progress.
|
||||
ifndef SERIAL
|
||||
SERIAL := serial.o
|
||||
endif
|
||||
|
||||
|
||||
# Final versions of the toolchain flags.
|
||||
CFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \
|
||||
$(AFLAGS) -fomit-frame-pointer -mstackrealign -Wall \
|
||||
-fno-strict-aliasing
|
||||
|
||||
# Add freetyp2 references through pkgconfig
|
||||
CFLAGS := $(CFLAGS) `pkg-config.exe --cflags freetype2`
|
||||
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
|
||||
|
||||
#########################################################################
|
||||
# Create the (final) list of objects to build. #
|
||||
#########################################################################
|
||||
MAINOBJ := pc.o config.o random.o timer.o io.o apm.o dma.o nmi.o \
|
||||
pic.o pit.o port_92.o ppi.o pci.o mca.o mcr.o mem_new.o \
|
||||
rom.o device.o nvr.o nvr_at.o nvr_ps2.o $(VNCOBJ) $(RDPOBJ)
|
||||
|
||||
INTELOBJ := intel_flash.o \
|
||||
intel_sio.o intel_piix.o
|
||||
|
||||
CPUOBJ := cpu.o cpu_table.o \
|
||||
808x.o 386.o 386_common.o \
|
||||
386_dynarec.o \
|
||||
x86seg.o x87.o \
|
||||
$(DYNARECOBJ)
|
||||
|
||||
CHIPSETOBJ := acc2168.o acer_m3a.o ali1429.o headland.o \
|
||||
intel_4x0.o neat.o opti495.o scat.o \
|
||||
sis_85c471.o sis_85c496.o \
|
||||
wd76c10.o
|
||||
|
||||
MCHOBJ := machine.o machine_table_new.o \
|
||||
m_xt.o m_xt_compaq.o \
|
||||
m_xt_t1000.o m_xt_t1000_vid.o \
|
||||
m_xt_xi8088.o m_xt_zenith.o \
|
||||
m_pcjr.o \
|
||||
m_amstrad.o m_europc.o \
|
||||
m_olivetti_m24.o m_tandy.o \
|
||||
m_at.o m_at_commodore.o \
|
||||
m_at_t3100e.o m_at_t3100e_vid.o \
|
||||
m_ps1.o m_ps1_hdc.o \
|
||||
m_ps2_isa.o m_ps2_mca.o \
|
||||
m_at_compaq.o \
|
||||
m_at_286_386sx.o m_at_386dx_486.o \
|
||||
m_at_socket4_5.o m_at_socket7_s7.o
|
||||
|
||||
DEVOBJ := bugger.o ibm_5161.o isamem.o isartc.o lpt.o $(SERIAL) \
|
||||
sio_acc3221.o \
|
||||
sio_fdc37c66x.o sio_fdc37c669.o \
|
||||
sio_fdc37c93x.o \
|
||||
sio_pc87306.o sio_w83877f.o \
|
||||
sio_um8669f.o \
|
||||
keyboard.o \
|
||||
keyboard_xt.o keyboard_at.o \
|
||||
gameport.o \
|
||||
joystick_standard.o joystick_ch_flightstick_pro.o \
|
||||
joystick_sw_pad.o joystick_tm_fcs.o \
|
||||
mouse.o \
|
||||
mouse_bus.o \
|
||||
mouse_serial.o mouse_ps2.o
|
||||
|
||||
FDDOBJ := fdd.o fdc.o fdi2raw.o \
|
||||
fdd_common.o fdd_86f.o \
|
||||
fdd_fdi.o fdd_imd.o fdd_img.o fdd_json.o \
|
||||
fdd_mfm.o fdd_td0.o
|
||||
|
||||
HDDOBJ := hdd.o \
|
||||
hdd_image.o hdd_table.o \
|
||||
hdc.o \
|
||||
hdc_st506_xt.o hdc_st506_at.o \
|
||||
hdc_xta.o \
|
||||
hdc_esdi_at.o hdc_esdi_mca.o \
|
||||
hdc_xtide.o hdc_ide.o \
|
||||
hdc_ide_sff8038i.o
|
||||
|
||||
CDROMOBJ := cdrom.o \
|
||||
cdrom_dosbox.o cdrom_image.o
|
||||
|
||||
ZIPOBJ := zip.o
|
||||
|
||||
ifeq ($(USB), y)
|
||||
USBOBJ := usb.o
|
||||
endif
|
||||
|
||||
SCSIOBJ := scsi.o scsi_device.o \
|
||||
scsi_cdrom.o scsi_disk.o \
|
||||
scsi_x54x.o \
|
||||
scsi_aha154x.o scsi_buslogic.o \
|
||||
scsi_ncr5380.o scsi_ncr53c8xx.o
|
||||
|
||||
NETOBJ := network.o \
|
||||
net_pcap.o \
|
||||
net_slirp.o \
|
||||
bootp.o ip_icmp.o misc.o socket.o tcp_timer.o cksum.o \
|
||||
ip_input.o queue.o tcp_input.o debug.o ip_output.o \
|
||||
sbuf.o tcp_output.o udp.o if.o mbuf.o slirp.o tcp_subr.o \
|
||||
net_dp8390.o \
|
||||
net_3c503.o net_ne2000.o \
|
||||
net_wd8003.o
|
||||
|
||||
PRINTOBJ := png.o prt_cpmap.o \
|
||||
prt_escp.o prt_text.o
|
||||
|
||||
SNDOBJ := sound.o \
|
||||
openal.o \
|
||||
snd_opl.o snd_dbopl.o \
|
||||
dbopl.o nukedopl.o \
|
||||
snd_resid.o \
|
||||
convolve.o convolve-sse.o envelope.o extfilt.o \
|
||||
filter.o pot.o sid.o voice.o wave6581__ST.o \
|
||||
wave6581_P_T.o wave6581_PS_.o wave6581_PST.o \
|
||||
wave8580__ST.o wave8580_P_T.o wave8580_PS_.o \
|
||||
wave8580_PST.o wave.o \
|
||||
midi.o midi_system.o \
|
||||
snd_speaker.o \
|
||||
snd_pssj.o \
|
||||
snd_lpt_dac.o snd_lpt_dss.o \
|
||||
snd_adlib.o snd_adlibgold.o snd_ad1848.o snd_audiopci.o \
|
||||
snd_cms.o \
|
||||
snd_gus.o \
|
||||
snd_sb.o snd_sb_dsp.o \
|
||||
snd_emu8k.o snd_mpu401.o \
|
||||
snd_sn76489.o snd_ssi2001.o \
|
||||
snd_wss.o \
|
||||
snd_ym7128.o
|
||||
|
||||
VIDOBJ := video.o \
|
||||
vid_table.o \
|
||||
vid_cga.o vid_cga_comp.o \
|
||||
vid_compaq_cga.o \
|
||||
vid_mda.o \
|
||||
vid_hercules.o vid_herculesplus.o vid_incolor.o \
|
||||
vid_colorplus.o \
|
||||
vid_genius.o \
|
||||
vid_pgc.o vid_im1024.o \
|
||||
vid_sigma.o \
|
||||
vid_wy700.o \
|
||||
vid_ega.o vid_ega_render.o \
|
||||
vid_svga.o vid_svga_render.o \
|
||||
vid_vga.o \
|
||||
vid_ati_eeprom.o \
|
||||
vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati_mach64.o vid_ati68860_ramdac.o \
|
||||
vid_bt48x_ramdac.o \
|
||||
vid_av9194.o \
|
||||
vid_icd2061.o vid_ics2595.o \
|
||||
vid_cl54xx.o \
|
||||
vid_et4000.o vid_sc1502x_ramdac.o \
|
||||
vid_et4000w32.o vid_stg_ramdac.o \
|
||||
vid_ht216.o \
|
||||
vid_oak_oti.o \
|
||||
vid_paradise.o \
|
||||
vid_ti_cf62011.o \
|
||||
vid_tvga.o \
|
||||
vid_tgui9440.o vid_tkd8001_ramdac.o \
|
||||
vid_att20c49x_ramdac.o \
|
||||
vid_s3.o vid_s3_virge.o \
|
||||
vid_sdac_ramdac.o \
|
||||
vid_voodoo.o
|
||||
|
||||
PLATOBJ := win.o \
|
||||
win_dynld.o win_thread.o \
|
||||
win_cdrom.o win_keyboard.o \
|
||||
win_midi.o
|
||||
ifeq ($(DINPUT), y)
|
||||
PLATOBJ += win_mouse.o win_joystick.o
|
||||
else
|
||||
PLATOBJ += win_mouse_rawinput.o win_joystick_xinput.o
|
||||
endif
|
||||
|
||||
OBJ := $(MAINOBJ) $(INTELOBJ) $(CPUOBJ) $(CHIPSETOBJ) $(MCHOBJ) \
|
||||
$(DEVOBJ) $(FDDOBJ) $(CDROMOBJ) $(ZIPOBJ) $(HDDOBJ) \
|
||||
$(USBOBJ) $(NETOBJ) $(PRINTOBJ) $(SCSIOBJ) $(SNDOBJ) $(VIDOBJ) \
|
||||
$(PLATOBJ) $(UIOBJ) $(D2DOBJ) $(FSYNTHOBJ) $(MUNTOBJ) \
|
||||
$(DEVBROBJ)
|
||||
ifdef EXOBJ
|
||||
OBJ += $(EXOBJ)
|
||||
endif
|
||||
|
||||
LIBS := -mwindows \
|
||||
-lddraw -ldxguid -ld3d9 \
|
||||
-lcomctl32
|
||||
|
||||
ifeq ($(STATIC), y)
|
||||
LIBS += -lopenal -lole32 -lwinmm
|
||||
else
|
||||
LIBS += -lwinmm -lopenal.dll
|
||||
endif
|
||||
|
||||
ifeq ($(D2D), y)
|
||||
LIBS += $(D2DLIB)
|
||||
endif
|
||||
ifeq ($(VNC), y)
|
||||
LIBS += $(VNCLIB) -lws2_32
|
||||
endif
|
||||
ifeq ($(RDP), y)
|
||||
LIBS += $(RDPLIB)
|
||||
endif
|
||||
ifneq ($(WX), n)
|
||||
LIBS += $(WX_LIBS) -lm
|
||||
endif
|
||||
LIBS += -lpng -lz -lwsock32 -liphlpapi
|
||||
LIBS += -static -lstdc++
|
||||
ifneq ($(X64), y)
|
||||
LIBS += -Wl,--large-address-aware
|
||||
endif
|
||||
ifeq ($(DINPUT), y)
|
||||
LIBS += -ldinput8
|
||||
else
|
||||
LIBS += -lxinput
|
||||
endif
|
||||
ifeq ($(D3DX), y)
|
||||
LIBS += -ld3dx9
|
||||
endif
|
||||
|
||||
ifeq ($(STATIC), y)
|
||||
LIBS += -static
|
||||
endif
|
||||
|
||||
# Build module rules.
|
||||
ifeq ($(AUTODEP), y)
|
||||
%.o: %.c
|
||||
@echo $<
|
||||
@$(CC) $(CFLAGS) $(DEPS) -c $<
|
||||
|
||||
%.o: %.cc
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) $(DEPS) -c $<
|
||||
|
||||
%.o: %.cpp
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) $(DEPS) -c $<
|
||||
else
|
||||
%.o: %.c
|
||||
@echo $<
|
||||
@$(CC) $(CFLAGS) -c $<
|
||||
|
||||
%.o: %.cc
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o: %.cpp
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
%.d: %.c $(wildcard $*.d)
|
||||
@echo $<
|
||||
@$(CC) $(CFLAGS) $(DEPS) -E $< >NUL
|
||||
|
||||
%.d: %.cc $(wildcard $*.d)
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) $(DEPS) -E $< >NUL
|
||||
|
||||
%.d: %.cpp $(wildcard $*.d)
|
||||
@echo $<
|
||||
@$(CPP) $(CXXFLAGS) $(DEPS) -E $< >NUL
|
||||
endif
|
||||
|
||||
|
||||
all: $(PROG).exe pcap_if.exe
|
||||
|
||||
|
||||
86Box.res: 86Box.rc
|
||||
@echo Processing $<
|
||||
@$(WINDRES) $(RFLAGS) $(EXTRAS) -i $< -o 86Box.res
|
||||
|
||||
$(PROG).exe: $(OBJ) 86Box.res
|
||||
@echo Linking $(PROG).exe ..
|
||||
@$(CC) -o $(PROG).exe $(OBJ) 86Box.res $(LIBS)
|
||||
ifneq ($(DEBUG), y)
|
||||
@$(STRIP) $(PROG).exe
|
||||
endif
|
||||
|
||||
pcap_if.res: pcap_if.rc
|
||||
@echo Processing $<
|
||||
@$(WINDRES) $(RFLAGS) -i $< -o pcap_if.res
|
||||
|
||||
pcap_if.exe: pcap_if.o win_dynld.o pcap_if.res
|
||||
@echo Linking pcap_if.exe ..
|
||||
@$(CC) -o pcap_if.exe pcap_if.o win_dynld.o pcap_if.res
|
||||
ifneq ($(DEBUG), y)
|
||||
@$(STRIP) pcap_if.exe
|
||||
endif
|
||||
|
||||
hello.exe: hello.o
|
||||
$(CXX) $(LDFLAGS) -o hello.exe hello.o $(WXLIBS) $(LIBS)
|
||||
ifneq ($(DEBUG), y)
|
||||
@$(STRIP) hello.exe
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
@echo Cleaning objects..
|
||||
@-rm -f *.o 2>NUL
|
||||
@-rm -f *.res 2>NUL
|
||||
|
||||
clobber: clean
|
||||
@echo Cleaning executables..
|
||||
@-rm -f *.d 2>NUL
|
||||
@-rm -f *.exe 2>NUL
|
||||
# @-rm -f $(DEPFILE) 2>NUL
|
||||
|
||||
ifneq ($(AUTODEP), y)
|
||||
depclean:
|
||||
@-rm -f $(DEPFILE) 2>NUL
|
||||
@echo Creating dependencies..
|
||||
@echo # Run "make depends" to re-create this file. >$(DEPFILE)
|
||||
|
||||
depends: DEPOBJ=$(OBJ:%.o=%.d)
|
||||
depends: depclean $(OBJ:%.o=%.d)
|
||||
@-cat $(DEPOBJ) >>$(DEPFILE)
|
||||
@-rm -f $(DEPOBJ)
|
||||
|
||||
$(DEPFILE):
|
||||
endif
|
||||
|
||||
|
||||
# Module dependencies.
|
||||
ifeq ($(AUTODEP), y)
|
||||
#-include $(OBJ:%.o=%.d) (better, but sloooowwwww)
|
||||
-include *.d
|
||||
else
|
||||
include $(wildcard $(DEPFILE))
|
||||
endif
|
||||
|
||||
|
||||
# End of Makefile.mingw.
|
||||
Reference in New Issue
Block a user