commit
592643ed68
12 changed files with 38 additions and 11 deletions
2
Makefile
2
Makefile
|
@ -176,7 +176,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Make tools if out of date
|
# Make tools if out of date
|
||||||
DUMMY != make -s -C tools >&2 || echo FAIL
|
DUMMY != $(MAKE) -s -C tools >&2 || echo FAIL
|
||||||
ifeq ($(DUMMY),FAIL)
|
ifeq ($(DUMMY),FAIL)
|
||||||
$(error Failed to build tools)
|
$(error Failed to build tools)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -152,9 +152,15 @@ def main():
|
||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
make = "make"
|
||||||
|
|
||||||
|
for path in os.environ["PATH"].split(os.pathsep):
|
||||||
|
if os.path.isfile(os.path.join(path, "gmake")):
|
||||||
|
make = "gmake"
|
||||||
|
|
||||||
# Make sure tools exist
|
# Make sure tools exist
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
[make, "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#if defined(__linux__) && !defined(TARGET_WEB)
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if (defined(__linux__) || defined(__BSD__)) && !defined(TARGET_WEB)
|
||||||
/*
|
/*
|
||||||
Simple sound playback using ALSA API and libasound.
|
Simple sound playback using ALSA API and libasound.
|
||||||
Dependencies: libasound, alsa
|
Dependencies: libasound, alsa
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#ifndef AUDIO_ALSA_H
|
#ifndef AUDIO_ALSA_H
|
||||||
#define AUDIO_ALSA_H
|
#define AUDIO_ALSA_H
|
||||||
|
|
||||||
#ifdef __linux__
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__BSD__)
|
||||||
extern struct AudioAPI audio_alsa;
|
extern struct AudioAPI audio_alsa;
|
||||||
#define HAVE_ALSA 1
|
#define HAVE_ALSA 1
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#ifdef __linux__
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__BSD__)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#ifndef AUDIO_PULSE_H
|
#ifndef AUDIO_PULSE_H
|
||||||
#define AUDIO_PULSE_H
|
#define AUDIO_PULSE_H
|
||||||
|
|
||||||
#ifdef __linux__
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__BSD__)
|
||||||
extern struct AudioAPI audio_pulse;
|
extern struct AudioAPI audio_pulse;
|
||||||
#define HAVE_PULSE_AUDIO 1
|
#define HAVE_PULSE_AUDIO 1
|
||||||
#else
|
#else
|
||||||
|
|
8
src/pc/compat.h
Normal file
8
src/pc/compat.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef COMPAT_H
|
||||||
|
#define COMPAT_H value
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
|
#define __BSD__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,4 +1,4 @@
|
||||||
#if !defined(__MINGW32__) && !defined(TARGET_WEB)
|
#if !defined(__MINGW32__) && !defined(__BSD__) && !defined(TARGET_WEB)
|
||||||
// See LICENSE for license
|
// See LICENSE for license
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 600
|
#define _XOPEN_SOURCE 600
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#ifdef __linux__
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__BSD__)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#if !defined(__linux__) && defined(ENABLE_OPENGL)
|
#include "../compat.h"
|
||||||
|
|
||||||
|
#if !defined(__linux__) && !defined(__BSD__) && defined(ENABLE_OPENGL)
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#define FOR_WINDOWS 1
|
#define FOR_WINDOWS 1
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
|
||||||
#define CONFIG_FILE "sm64config.txt"
|
#define CONFIG_FILE "sm64config.txt"
|
||||||
|
|
||||||
OSMesg D_80339BEC;
|
OSMesg D_80339BEC;
|
||||||
|
@ -158,7 +160,7 @@ void main_func(void) {
|
||||||
wm_api = &gfx_dxgi_api;
|
wm_api = &gfx_dxgi_api;
|
||||||
#elif defined(ENABLE_OPENGL)
|
#elif defined(ENABLE_OPENGL)
|
||||||
rendering_api = &gfx_opengl_api;
|
rendering_api = &gfx_opengl_api;
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || defined(__BSD__)
|
||||||
wm_api = &gfx_glx;
|
wm_api = &gfx_glx;
|
||||||
#else
|
#else
|
||||||
wm_api = &gfx_sdl;
|
wm_api = &gfx_sdl;
|
||||||
|
|
|
@ -23,7 +23,6 @@ SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "exoquant.h"
|
#include "exoquant.h"
|
||||||
#include <malloc.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue