Skip to content

Commit

Permalink
Preliminary support of meson builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmiles32 committed Dec 3, 2017
1 parent 6b53176 commit 6046b60
Show file tree
Hide file tree
Showing 26 changed files with 580 additions and 11 deletions.
435 changes: 435 additions & 0 deletions meson.build

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
option('vc', type : 'boolean', value : false,
description : 'Build against Broadcom Videocore GLESv2')
option('gles', type : 'boolean', value : false,
description : 'Build against GLESv2 instead of OpenGL')
option('osd', type : 'boolean', value : true,
description : 'Enable/Disable build of OpenGL on-screen display')
option('new_dynarec', type : 'boolean', value : false,
description : 'Replace dynamic recompiler with Ari64\'s experimental dynarec')
option('lirc', type : 'boolean', value : false,
description : 'Enable LIRC support')
option('debugger', type : 'boolean', value : false,
description : 'Build debugger API into core for front-ends. Runs slower.')
option('dbg_compare', type : 'boolean', value : false,
description : 'Enable core-synchronized r4300 debugging')
option('dbg_core', type : 'boolean', value : false,
description : 'Print debugging info in r4300 core')
option('dbg_count', type : 'boolean', value : false,
description : 'Print r4300 instruction count totls (64-bit dynarec only)')
option('dbg_timing', type : 'boolean', value : false,
description : 'Print timing data')
option('dbg_profile', type : 'boolean', value : false,
description : 'Dump profiling data for r4300 dynarec to data file')
option('no_asm', type : 'boolean', value : false,
description : 'build without assembly (no dynamic recompiler or MMX/SSE code)')
option('sharedir', type : 'string', value : '',
description : 'path to install shared data files. Leaving empty will use the per-platform default.')
option('arm_fpu', type : 'combo', choices : ['', 'neon', 'vfp-hard', 'vfp-soft'], value : '',
description : 'ARM FPU mode.')
2 changes: 1 addition & 1 deletion src/api/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <md5.h>

#define M64P_CORE_PROTOTYPES 1
#include "callbacks.h"
Expand All @@ -38,7 +39,6 @@
#include "main/cheat.h"
#include "main/eventloop.h"
#include "main/main.h"
#include "main/md5.h"
#include "main/rom.h"
#include "main/savestates.h"
#include "main/util.h"
Expand Down
3 changes: 2 additions & 1 deletion src/device/r4300/mips_instructions.def
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
#include "device/memory/memory.h"
#include "device/rcp/mi/mi_controller.h"
#include "device/rdram/rdram.h"
#include "main/xxHash/xxhash.h"

#include <xxhash.h>

#include <inttypes.h>
#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion src/main/rom.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#ifndef __ROM_H__
#define __ROM_H__

#include <md5.h>
#include <stdint.h>

#include "api/m64p_types.h"
#include "md5.h"

#define BIT(bitnr) (1ULL << (bitnr))
#ifdef __GNUC__
Expand Down
10 changes: 2 additions & 8 deletions src/main/savestates.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <string.h>
#include <sys/types.h>
#include <zlib.h>
#include <unzip.h>
#include <zip.h>

#define M64P_CORE_PROTOTYPES 1
#include "api/callbacks.h"
Expand Down Expand Up @@ -58,14 +60,6 @@
#include "util.h"
#include "workqueue.h"

#ifdef LIBMINIZIP
#include <unzip.h>
#include <zip.h>
#else
#include "main/zip/unzip.h"
#include "main/zip/zip.h"
#endif

enum { GB_CART_FINGERPRINT_SIZE = 0x1c };
enum { GB_CART_FINGERPRINT_OFFSET = 0x134 };

Expand Down
10 changes: 10 additions & 0 deletions subprojects/libpng.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wrap-file]
directory = libpng-1.6.17

source_url = ftp://ftp.simplesystems.org/pub/libpng/png/src/history/libpng16/libpng-1.6.17.tar.xz
source_filename = libpng-1.6.17.tar.xz
source_hash = 98507b55fbe5cd43c51981f2924e4671fd81fe35d52dc53357e20f2c77fa5dfd

patch_url = https://wrapdb.mesonbuild.com/v1/projects/libpng/1.6.17/6/get_zip
patch_filename = libpng-1.6.17-6-wrap.zip
patch_hash = 8bd272e28e6ae84691935e84bca9f5eb02632221e6faccf427eb71bf745a7295
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions subprojects/md5/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project('md5', 'c',
version : '1.6')

src = ['md5.c']

inc = include_directories('.')

libmd5 = static_library('md5',
src,
include_directories : inc,
version : meson.project_version())

md5_dep = declare_dependency(
include_directories : inc,
link_with : libmd5)
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions subprojects/minizip/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
project('minizip', 'c',
version : '1.1')

src = [ 'ioapi.c',
'zip.c',
'unzip.c' ]

inc = include_directories('.')

# Disable crypt and uncrypt modules
c_args = ['-DNOCRYPT', '-DNOUNCRYPT']

# Disable 64-bit IO on bsd
if host_machine.system() == 'bsd'
c_args += ['-DIOAPI_NO_64']
endif

libminizip = static_library('minizip',
src,
include_directories : inc,
version : meson.project_version(),
c_args : c_args)

minizip_dep = declare_dependency(
include_directories : inc,
link_with : libminizip)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions subprojects/oglft/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project('oglft', 'cpp',
version : '1.15')

src = ['OGLFT.cpp']

inc = include_directories('.')

freetype2 = dependency('freetype2')
gl = dependency('gl')
glu = dependency('glu')
sdl = dependency('sdl2', required : false)
if not sdl.found()
sdl = dependency('sdl')
endif

liboglft = static_library('oglft',
src,
include_directories : inc,
version : meson.project_version(),
dependencies : [freetype2, gl, glu, sdl])

oglft_dep = declare_dependency(
include_directories : inc,
link_with : liboglft,
dependencies : [freetype2, glu, sdl])
10 changes: 10 additions & 0 deletions subprojects/sdl2.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wrap-file]
directory = SDL2-2.0.3

source_url = https://libsdl.org/release/SDL2-2.0.3.zip
source_filename = SDL2-2.0.3.zip
source_hash = 70f43388f15110934e272e3469277bb964a735814349ad135a7d21a1c49c0c44

patch_url = https://wrapdb.mesonbuild.com/v1/projects/sdl2/2.0.3/5/get_zip
patch_filename = sdl2-2.0.3-5-wrap.zip
patch_hash = 70a77069d28eecab402dd0a210570deba7dabfb90c1ce5b912292744ff4610fa
15 changes: 15 additions & 0 deletions subprojects/xxHash/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project('xxhash', 'c',
version : '1.6')

src = ['xxhash.c']

inc = include_directories('.')

libxxhash = static_library('xxhash',
src,
include_directories : inc,
version : meson.project_version())

xxhash_dep = declare_dependency(
include_directories : inc,
link_with : libxxhash)
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions subprojects/zlib.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wrap-file]
directory = zlib-1.2.8

source_url = http://zlib.net/fossils/zlib-1.2.8.tar.gz
source_filename = zlib-1.2.8.tar.gz
source_hash = 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d

patch_url = https://wrapdb.mesonbuild.com/v1/projects/zlib/1.2.8/8/get_zip
patch_filename = zlib-1.2.8-8-wrap.zip
patch_hash = 17c52a0e0c59ce926d3959005d5cd8178c6c7e2c9a4a1304279a8320c955ac60

0 comments on commit 6046b60

Please sign in to comment.