Fixed PC speaker sound volume in PIT mode 0; A few CPU emulation clean-ups; Hard disk controller changing redone in a less messy way; Re-added the long-missing key send delay handling to the XT keyboard handler; Fixed a bug that was causing SLiRP not to work when compiled with MingW/GCC 7.3.0-2 or newer; Some serial mouse and port fixes; A lot of changes to printer emulation, mostly based on DOSBox-X; Printer PNG writer now uses statically linked libpng; Added support for the HxC MFM floppy image format and upped 86F format version to 2.12; Ported various things from PCem and some from VARCem; Added the S3 86c801/805 emulation (patch from TheCollector1995); Fixed and renamed the EGA monitor options; Better synchronized the 808x to the PIT and the CGA; Fixed the CGA wait state calculation; Cleaned up some things in mem.c; Fixed some things in the floppy emulation to make VisiOn get the correct errors from the copy protection disk; Fixed several renderer-related bugs, including the SDL2 renderer's failure to take screenshots; The Jenkins builds are now compiled with MingW/GCC 7.4.0-1 and include all the required DLL's.
715 lines
14 KiB
Makefile
715 lines
14 KiB
Makefile
#
|
|
# 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.136 2019/01/13
|
|
#
|
|
# 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 := 1
|
|
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 GUS_MAX
|
|
GUS_MAX := y
|
|
endif
|
|
ifndef I686
|
|
I686 := y
|
|
endif
|
|
ifndef LASERXT
|
|
LASERXT := y
|
|
endif
|
|
ifndef MRTHOR
|
|
MRTHOR := y
|
|
endif
|
|
ifndef PAS16
|
|
PAS16 := y
|
|
endif
|
|
ifndef PORTABLE3
|
|
PORTABLE3 := y
|
|
endif
|
|
ifndef PS2M70T4
|
|
PS2M70T4 := 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 GUS_MAX
|
|
GUS_MAX := n
|
|
endif
|
|
ifndef I686
|
|
I686 := n
|
|
endif
|
|
ifndef LASERXT
|
|
LASERXT := n
|
|
endif
|
|
ifndef MRTHOR
|
|
MRTHOR := n
|
|
endif
|
|
ifndef PAS16
|
|
PAS16 := n
|
|
endif
|
|
ifndef PORTABLE3
|
|
PORTABLE3 := n
|
|
endif
|
|
ifndef PS2M70T4
|
|
PS2M70T4 := 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 WX
|
|
WX := n
|
|
endif
|
|
ifndef USB
|
|
USB := n
|
|
endif
|
|
ifndef RDP
|
|
RDP := n
|
|
endif
|
|
ifndef OPENAL
|
|
OPENAL := y
|
|
endif
|
|
ifndef FLUIDSYNTH
|
|
FLUIDSYNTH := y
|
|
endif
|
|
ifndef MUNT
|
|
MUNT := y
|
|
endif
|
|
ifndef DYNAREC
|
|
DYNAREC := y
|
|
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 \
|
|
cdrom 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)
|
|
CPP := g++ -m64
|
|
CC := gcc -m64
|
|
else
|
|
CPP := g++ -m32
|
|
CC := gcc -m32
|
|
endif
|
|
WINDRES := windres
|
|
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
|
|
RFLAGS := --input-format=rc -O coff
|
|
ifeq ($(RELEASE), y)
|
|
OPTS += -DRELEASE_BUILD
|
|
RFLAGS += -DRELEASE_BUILD
|
|
endif
|
|
ifeq ($(VRAMDUMP), y)
|
|
OPTS += -DENABLE_VRAM_DUMP
|
|
RFLAGS += -DENABLE_VRAM_DUMP
|
|
endif
|
|
ifeq ($(X64), y)
|
|
PLATCG := codegen_x86-64.o
|
|
CGOPS := codegen_ops_x86-64.h
|
|
VCG := vid_voodoo_codegen_x86-64.h
|
|
else
|
|
PLATCG := codegen_x86.o
|
|
CGOPS := codegen_ops_x86.h
|
|
VCG := vid_voodoo_codegen_x86.h
|
|
endif
|
|
|
|
|
|
# Optional modules.
|
|
ifeq ($(DYNAREC), y)
|
|
OPTS += -DUSE_DYNAREC
|
|
RFLAGS += -DUSE_DYNAREC
|
|
DYNARECOBJ := 386_dynarec_ops.o \
|
|
codegen.o \
|
|
codegen_ops.o \
|
|
codegen_timing_common.o codegen_timing_486.o \
|
|
codegen_timing_686.o codegen_timing_pentium.o \
|
|
codegen_timing_winchip.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
|
|
|
|
# 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 ($(GUS_MAX), y)
|
|
OPTS += -DUSE_GUSMAX
|
|
DEVBROBJ += snd_cs423x.o
|
|
endif
|
|
|
|
ifeq ($(I686), y)
|
|
OPTS += -DUSE_I686
|
|
endif
|
|
|
|
ifeq ($(LASERXT), y)
|
|
OPTS += -DUSE_LASERXT
|
|
DEVBROBJ += m_xt_laserxt.o
|
|
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 ($(PS2M70T4), y)
|
|
OPTS += -DUSE_PS2M70T4
|
|
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
|
|
CXXFLAGS := $(CFLAGS)
|
|
|
|
|
|
#########################################################################
|
|
# Create the (final) list of objects to build. #
|
|
#########################################################################
|
|
MAINOBJ := pc.o config.o random.o timer.o io.o dma.o nmi.o pic.o \
|
|
pit.o ppi.o pci.o mca.o mcr.o mem.o memregs.o rom.o \
|
|
device.o nvr.o nvr_at.o nvr_ps2.o $(VNCOBJ) $(RDPOBJ)
|
|
|
|
INTELOBJ := intel.o \
|
|
intel_flash.o \
|
|
intel_sio.o intel_piix.o
|
|
|
|
CPUOBJ := cpu.o cpu_table.o \
|
|
808x.o 386.o 386_dynarec.o \
|
|
x86seg.o x87.o \
|
|
$(DYNARECOBJ)
|
|
|
|
MCHOBJ := machine.o machine_table.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_ali1429.o m_at_commodore.o \
|
|
m_at_neat.o m_at_headland.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_opti495.o m_at_scat.o \
|
|
m_at_compaq.o m_at_wd76c10.o \
|
|
m_at_sis_85c471.o m_at_sis_85c496.o \
|
|
m_at_4x0.o
|
|
|
|
DEVOBJ := bugger.o isamem.o isartc.o lpt.o $(SERIAL) \
|
|
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_mfm_xt.o hdc_mfm_at.o \
|
|
hdc_xta.o \
|
|
hdc_esdi_at.o hdc_esdi_mca.o \
|
|
hdc_xtide.o hdc_ide.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_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_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_mouse.o win_joystick.o win_midi.o
|
|
|
|
OBJ := $(MAINOBJ) $(INTELOBJ) $(CPUOBJ) $(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 \
|
|
-lopenal.dll \
|
|
-lddraw -ldinput8 -ldxguid -ld3d9 -ld3dx9 \
|
|
-lcomctl32 -lwinmm
|
|
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++ -lgcc
|
|
ifneq ($(X64), y)
|
|
LIBS += -Wl,--large-address-aware
|
|
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.
|