mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2024-12-03 21:07:15 +01:00
Make project buildable by MSVC
This commit is contained in:
parent
359561d762
commit
6adb4e7b8b
10
meson.build
10
meson.build
@ -1,8 +1,15 @@
|
|||||||
project('segatools', 'c', version: '0.1.0')
|
project('segatools', 'c', version: '0.1.0')
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
'-Wall',
|
|
||||||
'-DCOBJMACROS',
|
'-DCOBJMACROS',
|
||||||
|
'-DWIN32_LEAN_AND_MEAN',
|
||||||
|
language: 'c',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Use get_argument_syntax() instead once Meson 0.49.0 releases
|
||||||
|
if meson.get_compiler('c').get_id() != 'msvc'
|
||||||
|
add_project_arguments(
|
||||||
|
'-Wall',
|
||||||
'-ffunction-sections',
|
'-ffunction-sections',
|
||||||
'-fdata-sections',
|
'-fdata-sections',
|
||||||
language: 'c',
|
language: 'c',
|
||||||
@ -14,6 +21,7 @@ add_project_link_arguments(
|
|||||||
'-static-libgcc',
|
'-static-libgcc',
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
inc = include_directories('.')
|
inc = include_directories('.')
|
||||||
capnhook = subproject('capnhook')
|
capnhook = subproject('capnhook')
|
||||||
|
11
nu/ds.c
11
nu/ds.c
@ -1,4 +1,15 @@
|
|||||||
|
#define WIN32_NO_STATUS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#undef WIN32_NO_STATUS
|
||||||
|
#include <winternl.h>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <ntdef.h>
|
||||||
|
#else
|
||||||
|
#include <winnt.h>
|
||||||
|
#endif
|
||||||
|
#include <devioctl.h>
|
||||||
|
#include <ntdddisk.h>
|
||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <ntdef.h>
|
||||||
|
#else
|
||||||
|
#include <winnt.h>
|
||||||
|
#endif
|
||||||
|
#include <devioctl.h>
|
||||||
|
#include <ntdddisk.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "hook/iohook.h"
|
#include "hook/iohook.h"
|
||||||
|
4
nu/jvs.c
4
nu/jvs.c
@ -1,4 +1,8 @@
|
|||||||
|
#define WIN32_NO_STATUS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#undef WIN32_NO_STATUS
|
||||||
|
#include <winternl.h>
|
||||||
|
|
||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <ntdef.h>
|
||||||
|
#else
|
||||||
|
#include <winnt.h>
|
||||||
|
#endif
|
||||||
|
#include <devioctl.h>
|
||||||
|
#include <ntdddisk.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "hook/iohook.h"
|
#include "hook/iohook.h"
|
||||||
|
@ -1,15 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Making NTSTATUS available is slightly awkward. See:
|
||||||
|
https://kirkshoop.github.io/2011/09/20/ntstatus.html
|
||||||
|
*/
|
||||||
|
|
||||||
/* Win32 user-mode API */
|
/* Win32 user-mode API */
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#undef WIN32_NO_STATUS
|
||||||
#include <winternl.h>
|
#include <winternl.h>
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
#include <unknwn.h>
|
#include <unknwn.h>
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
|
|
||||||
/* Win32 kernel-mode definitions */
|
/* Win32 kernel-mode definitions */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* MinGW needs to include this for PHYSICAL_ADDRESS to be defined.
|
||||||
|
The MS SDK throws a bunch of duplicate symbol errors instead. */
|
||||||
#include <ntdef.h>
|
#include <ntdef.h>
|
||||||
#include <ntstatus.h>
|
#else
|
||||||
|
#include <winnt.h>
|
||||||
|
#endif
|
||||||
#include <devioctl.h>
|
#include <devioctl.h>
|
||||||
|
#include <ntdddisk.h>
|
||||||
#include <ntddser.h>
|
#include <ntddser.h>
|
||||||
|
#include <ntstatus.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user