Merge pull request #1398 from lemondrops/master

Makefile cleanup and consistency fixes
This commit is contained in:
Miran Grča
2021-04-26 00:12:54 +02:00
committed by GitHub
16 changed files with 55 additions and 54 deletions

View File

@@ -60,28 +60,26 @@ option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OF
option(DEV_BRANCH "Development branch" OFF)
CMAKE_DEPENDENT_OPTION(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(CL5422 "Cirrus Logic CL-GD 5402/5420/5422" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(HEDAKA "Hedaka HED-919" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(I450KX "Intel i450KX" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(LASERXT "VTech Laser XT" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(MGA "Matrox Mystique graphics adapters" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(NO_SIO "Machines without emulated Super I/O chips" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(OLIVETTI "Olivetti M290" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(OPENGL "OpenGL 3.3 Core renderer" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(PAS16 "Pro Audio Spectrum 16" OFF "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(PS1M2133 "IBM PS/1 model 2133" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(PS2M70T4 "IBM PS/2 model 70 (type 4)" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(S3TRIO3D2X "S3 Trio3D/2X" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(STPC "STPC machines" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(M1489 "ALi M1489" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(M154X "ALi ALADDiN IV" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(M6117 "ALi M6117" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(VNC "VNC renderer" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(VECT486VL "HP Vectra 486VL" ON "DEV_BRANCH" OFF)
CMAKE_DEPENDENT_OPTION(DELLS4 "Dell Dimension XPS P60; Dell OptiPlex 560/L" ON "DEV_BRANCH" OFF)
# HACK: Avoid a MSVC2019 compiler bug on ARM64 Debug builds
if(MSVC_TOOLSET_VERSION GREATER_EQUAL 142 AND CMAKE_TARGET_ARCHITECTURES STREQUAL "armv8")

View File

@@ -19,7 +19,7 @@ add_library(chipset OBJECT acc2168.c cs8230.c ali1217.c ali1429.c ali1489.c head
sis_85c310.c sis_85c4xx.c sis_85c496.c sis_85c50x.c sis_5511.c sis_5571.c sis_5598.c
umc_8886.c umc_8890.c umc_hb4.c
via_vt82c49x.c via_vt82c505.c sis_85c310.c sis_85c4xx.c sis_85c496.c sis_85c50x.c
gc100.c olivetti_eva.c stpc.c
gc100.c stpc.c
via_apollo.c via_pipc.c wd76c10.c
vl82c480.c)
@@ -34,4 +34,8 @@ endif()
if(M6117)
target_sources(chipset PRIVATE ali6117.c)
endif()
if(OLIVETTI)
target_sources(chipset PRIVATE olivetti_eva.c)
endif()

View File

@@ -529,7 +529,7 @@ load_general(void)
enable_discord = !!config_get_int(cat, "enable_discord", 0);
#endif
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
video_framerate = config_get_int(cat, "video_gl_framerate", -1);
video_vsync = config_get_int(cat, "video_gl_vsync", 0);
strcpy_s(video_shader, sizeof(video_shader), config_get_string(cat, "video_gl_shader", ""));
@@ -1974,7 +1974,7 @@ save_general(void)
config_delete_var(cat, "enable_discord");
#endif
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
if (video_framerate != -1)
config_set_int(cat, "video_gl_framerate", video_framerate);
else

View File

@@ -344,9 +344,7 @@ extern int machine_at_486sp3_init(const machine_t *);
extern int machine_at_486sp3c_init(const machine_t *);
extern int machine_at_486sp3g_init(const machine_t *);
extern int machine_at_486ap4_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern int machine_at_486vipio2_init(const machine_t *);
#endif
extern int machine_at_abpb4_init(const machine_t *);
extern int machine_at_win486pci_init(const machine_t *);

View File

@@ -341,7 +341,7 @@
#define IDM_DISCORD 40090
#endif
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
#define IDM_VID_GL_FPS_BLITTER 40100
#define IDM_VID_GL_FPS_25 40101
#define IDM_VID_GL_FPS_30 40102

View File

@@ -58,7 +58,9 @@ extern const device_t prime3b_ide_device;
extern const device_t prime3c_device;
extern const device_t prime3c_ide_device;
extern const device_t ps1_m2133_sio;
#if defined(DEV_BRANCH) && defined(USE_SIO_DETECT)
extern const device_t sio_detect_device;
#endif
extern const device_t um8669f_device;
extern const device_t via_vt82c686_sio_device;
extern const device_t w83787f_device;

View File

@@ -197,7 +197,9 @@ extern const device_t mach64gx_pci_device;
extern const device_t mach64vt2_device;
/* ATi 18800 */
#if defined(DEV_BRANCH) && defined(USE_VGAWONDER)
extern const device_t ati18800_wonder_device;
#endif
extern const device_t ati18800_vga88_device;
extern const device_t ati18800_device;

View File

@@ -63,7 +63,7 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define ZIP_SUBMENU_NAME L"ZIPSubmenu"
#define MO_SUBMENU_NAME L"MOSubmenu"
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
#define VID_GL_SUBMENU L"VidGLSubMenu"
#endif

View File

@@ -44,10 +44,6 @@ if(OPEN_AT)
target_compile_definitions(mch PRIVATE USE_OPEN_AT)
endif()
if(PS1M2133)
target_compile_definitions(mch PRIVATE USE_PS1M2133)
endif()
if(PS2M70T4)
target_compile_definitions(mch PRIVATE USE_PS2M70T4)
endif()

View File

@@ -796,7 +796,7 @@ machine_at_m290_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/olivetti_m290/m290_pep3_1.25.bin",
ret = bios_load_linear("roms/machines/m290/m290_pep3_1.25.bin",
0x000f0000, 65536, 0);
if (bios_only || !ret)

View File

@@ -249,9 +249,7 @@ const machine_t machines[] = {
{ "[STPC Consumer-II] Acrosser AR-B1479", "arb1479", MACHINE_TYPE_486, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 163840, 8192, 255, machine_at_arb1479_init, NULL },
{ "[STPC Elite] Advantech PCM-9340", "pcm9340", MACHINE_TYPE_486, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 98304, 8192, 255, machine_at_pcm9340_init, NULL },
{ "[STPC Atlas] AAEON PCM-5330", "pcm5330", MACHINE_TYPE_486, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 131072,32768, 255, machine_at_pcm5330_init, NULL },
#if defined(DEV_BRANCH) && defined(NO_SIO)
{ "[VIA VT82C496G] FIC VIP-IO2", "486vipio2", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_486vipio2_init, NULL },
#endif
/* Socket 4 machines */
/* 430LX */

View File

@@ -66,7 +66,7 @@ BEGIN
MENUITEM "&SDL (Software)", IDM_VID_SDL_SW
MENUITEM "SDL (&Hardware)", IDM_VID_SDL_HW
MENUITEM "SDL (&OpenGL)", IDM_VID_SDL_OPENGL
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
MENUITEM "Open&GL (3.3 Core)", IDM_VID_OPENGL_CORE
#endif
#ifdef USE_VNC
@@ -237,7 +237,7 @@ BEGIN
END
END
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
VidGLSubMenu MENU DISCARDABLE
BEGIN
POPUP "Target &framerate"

View File

@@ -20,7 +20,7 @@ add_library(plat OBJECT win.c win_dynld.c win_thread.c win_cdrom.c
add_library(ui OBJECT win_ui.c win_stbar.c win_sdl.c win_dialog.c win_about.c
win_settings.c win_devconf.c win_snd_gain.c win_specify_dim.c win_new_floppy.c
win_jsconf.c win_media_menu.c 86Box.rc glad.c win_opengl.c win_opengl_glslp.c)
win_jsconf.c win_media_menu.c 86Box.rc)
if(MSVC)
# MSVC complains when we include the manifest from 86Box.rc...
@@ -49,5 +49,11 @@ if(DISCORD)
target_sources(ui PRIVATE win_discord.c)
endif()
if(OPENGL)
# PUBLIC due to config.c
target_compile_definitions(ui PUBLIC USE_OPENGL)
target_sources(ui PRIVATE glad.c win_opengl.c win_opengl_glslp.c)
endif()
target_link_libraries(86Box advapi32 comctl32 comdlg32 gdi32 shell32 iphlpapi
dxguid imm32 hid setupapi uxtheme version winmm psapi)

View File

@@ -36,9 +36,6 @@ ifeq ($(DEV_BUILD), y)
ifndef AMD_K5
AMD_K5 := y
endif
ifndef CL5422
CL5422 := y
endif
ifndef CYRIX_6X86
CYRIX_6X86 := y
endif
@@ -52,7 +49,7 @@ ifeq ($(DEV_BUILD), y)
I450KX := y
endif
ifndef M154X
M145X := y
M154X := y
endif
ifndef LASERXT
LASERXT := y
@@ -66,12 +63,12 @@ ifeq ($(DEV_BUILD), y)
ifndef OPEN_AT
OPEN_AT := y
endif
ifndef OPENGL
OPENGL := y
endif
ifndef PAS16
PAS16 := n
endif
ifndef PS1M2133
PS1M2133 := y
endif
ifndef PS2M70T4
PS2M70T4 := y
endif
@@ -96,8 +93,8 @@ ifeq ($(DEV_BUILD), y)
ifndef XL24
XL24 := y
endif
ifndef USE_VECT486VL
USE_VECT486VL := y
ifndef VECT486VL
VECT486VL := y
endif
ifndef OLIVETTI
OLIVETTI := y
@@ -112,9 +109,6 @@ else
ifndef AMD_K5
AMD_K5 := n
endif
ifndef CL5422
CL5422 := n
endif
ifndef CYRIX_6X86
CYRIX_6X86 := n
endif
@@ -131,7 +125,7 @@ else
LASERXT := n
endif
ifndef M154X
M145X := n
M154X := n
endif
ifndef MGA
MGA := n
@@ -142,12 +136,12 @@ else
ifndef OPEN_AT
OPEN_AT := n
endif
ifndef OPENGL
OPENGL := n
endif
ifndef PAS16
PAS16 := n
endif
ifndef PS1M2133
PS1M2133 := n
endif
ifndef PS2M70T4
PS2M70T4 := n
endif
@@ -172,8 +166,8 @@ else
ifndef XL24
XL24 := n
endif
ifndef USE_VECT486VL
USE_VECT486VL := n
ifndef VECT486VL
VECT486VL := n
endif
ifndef OLIVETTI
OLIVETTI := n
@@ -445,7 +439,7 @@ ifeq ($(WX), y)
UIOBJ := wx_main.o wx_ui.o wx_stbar.o wx_render.o
else
UIOBJ := win_ui.o win_stbar.o \
win_sdl.o win_opengl.o win_opengl_glslp.o glad.o \
win_sdl.o \
win_dialog.o win_about.o \
win_settings.o win_devconf.o win_snd_gain.o win_specify_dim.o \
win_new_floppy.o win_jsconf.o win_media_menu.o
@@ -539,15 +533,17 @@ ifeq ($(OPEN_AT), y)
OPTS += -DUSE_OPEN_AT
endif
ifeq ($(OPENGL), y)
OPTS += -DUSE_OPENGL
RFLAGS += -DUSE_OPENGL
DEVBROBJ += win_opengl.o win_opengl_glslp.o glad.o
endif
ifeq ($(PAS16), y)
OPTS += -DUSE_PAS16
DEVBROBJ += snd_pas16.o
endif
ifeq ($(PS1M2133), y)
OPTS += -DUSE_PS1M2133
endif
ifeq ($(PS2M70T4), y)
OPTS += -DUSE_PS2M70T4
endif
@@ -561,7 +557,7 @@ OPTS += -DUSE_SIO_DETECT
DEVBROBJ += sio_detect.o
endif
ifeq ($(M145X), y)
ifeq ($(M154X), y)
OPTS += -DUSE_M154X
DEVBROBJ += ali1531.o ali1543.o
endif
@@ -579,12 +575,13 @@ ifeq ($(XL24), y)
OPTS += -DUSE_XL24
endif
ifeq ($(USE_VECT486VL), y)
ifeq ($(VECT486VL), y)
OPTS += -DUSE_VECT486VL
endif
ifeq ($(OLIVETTI), y)
OPTS += -DUSE_OLIVETTI
DEVBROBJ += olivetti_eva.o
endif
@@ -620,7 +617,7 @@ CPUOBJ := cpu.o cpu_table.o fpu.o x86.o \
CHIPSETOBJ := acc2168.o cs8230.o ali1217.o ali1429.o ali1489.o headland.o intel_82335.o cs4031.o \
intel_420ex.o intel_4x0.o intel_sio.o intel_piix.o ioapic.o \
neat.o opti495.o opti822.o opti895.o opti5x7.o scamp.o scat.o via_vt82c49x.o via_vt82c505.o \
gc100.o olivetti_eva.o \
gc100.o \
sis_85c310.o sis_85c4xx.o sis_85c496.o sis_85c50x.o sis_5511.o sis_5571.o sis_5598.o stpc.o opti283.o opti291.o \
umc_8886.o umc_8890.o umc_hb4.o \
via_apollo.o via_pipc.o wd76c10.o vl82c480.o

View File

@@ -104,7 +104,7 @@ static const struct {
{ "SDL_Software", 1, (int(*)(void*))sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, NULL },
{ "SDL_Hardware", 1, (int(*)(void*))sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, NULL },
{ "SDL_OpenGL", 1, (int(*)(void*))sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, NULL }
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
,{ "OpenGL_Core", 1, (int(*)(void*))opengl_init, opengl_close, opengl_resize, opengl_pause, NULL, opengl_set_fs, opengl_reload}
#else
,{ "OpenGL_Core", 1, (int(*)(void*))sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, NULL } /* fall back to SDL_OpenGL */
@@ -939,7 +939,7 @@ plat_vidapi_name(int api)
case 2:
name = "sdl_opengl";
break;
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
case 3:
name = "opengl_core";
break;

View File

@@ -207,7 +207,7 @@ int delete_submenu(HMENU parent, HMENU target)
static void
show_render_options_menu()
{
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
static int menu_vidapi = -1;
static HMENU cur_menu = NULL;
@@ -288,7 +288,7 @@ ResetAllMenus(void)
CheckMenuItem(menuMain, IDM_VID_SDL_SW, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_SDL_HW, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_SDL_OPENGL, MF_UNCHECKED);
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
CheckMenuItem(menuMain, IDM_VID_OPENGL_CORE, MF_UNCHECKED);
show_render_options_menu();
#endif
@@ -738,7 +738,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_VID_SDL_SW:
case IDM_VID_SDL_HW:
case IDM_VID_SDL_OPENGL:
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
case IDM_VID_OPENGL_CORE:
#endif
#ifdef USE_VNC
@@ -751,7 +751,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
show_render_options_menu();
break;
#ifdef DEV_BRANCH /* feature-opengl */
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
case IDM_VID_GL_FPS_BLITTER:
case IDM_VID_GL_FPS_25:
case IDM_VID_GL_FPS_30: