Skip to content

Commit a4f54a4

Browse files
author
Felix "xq" Queißner
committed
Transfers most of the CMakeLists.txt to build.zig
1 parent 2288a8a commit a4f54a4

11 files changed

Lines changed: 600 additions & 0 deletions

File tree

Sdk.zig

Lines changed: 450 additions & 0 deletions
Large diffs are not rendered by default.

include/common/config.h

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#ifndef ODE_CONFIG_H
2+
#define ODE_CONFIG_H
3+
4+
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
5+
#define HAVE_ALLOCA_H 1
6+
7+
/* Use the Apple OpenGL framework. */
8+
#define HAVE_APPLE_OPENGL_FRAMEWORK 1
9+
10+
/* Define to 1 if you have the `gettimeofday' function. */
11+
#define HAVE_GETTIMEOFDAY 1
12+
13+
/* Define to 1 if you have the <inttypes.h> header file. */
14+
#define HAVE_INTTYPES_H 1
15+
16+
/* Define to 1 if you have the `isnan' function. */
17+
#define HAVE_ISNAN 1
18+
19+
/* Define to 1 if you have the `isnanf' function. */
20+
#define HAVE_ISNANF 1
21+
22+
/* Define to 1 if you have the <malloc.h> header file. */
23+
#define HAVE_MALLOC_H 1
24+
25+
/* Define to 1 if you have the `pthread_attr_setstacklazy' function. */
26+
// #define HAVE_PTHREAD_ATTR_SETSTACKLAZY 1
27+
28+
/* Define to 1 if you have the `pthread_condattr_setclock' function. */
29+
#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
30+
31+
/* Define to 1 if you have the <stdint.h> header file. */
32+
#define HAVE_STDINT_H 1
33+
34+
/* Define to 1 if you have the <sys/time.h> header file. */
35+
#define HAVE_SYS_TIME_H 1
36+
37+
/* Define to 1 if you have the <sys/types.h> header file. */
38+
#define HAVE_SYS_TYPES_H 1
39+
40+
/* Define to 1 if you have the <unistd.h> header file. */
41+
#define HAVE_UNISTD_H 1
42+
43+
/* Define to 1 if you have the `_isnan' function. */
44+
#define HAVE__ISNAN 1
45+
46+
/* Define to 1 if you have the `_isnanf' function. */
47+
#define HAVE__ISNANF 1
48+
49+
/* Define to 1 if you have the `__isnan' function. */
50+
#define HAVE___ISNAN 1
51+
52+
/* Define to 1 if you have the `__isnanf' function. */
53+
#define HAVE___ISNANF 1
54+
55+
/* compiling for a pentium on a gcc-based platform? */
56+
#define PENTIUM 1
57+
58+
/* compiling for a X86_64 system on a gcc-based platform? */
59+
#define X86_64_SYSTEM 1
60+
61+
/* Try to identify the platform */
62+
#if defined(_XENON)
63+
#define ODE_PLATFORM_XBOX360
64+
#elif defined(SN_TARGET_PSP_HW)
65+
#define ODE_PLATFORM_PSP
66+
#elif defined(SN_TARGET_PS3)
67+
#define ODE_PLATFORM_PS3
68+
#elif defined(_MSC_VER) || defined(__CYGWIN32__) || defined(__MINGW32__)
69+
#define ODE_PLATFORM_WINDOWS
70+
#elif defined(__linux__)
71+
#define ODE_PLATFORM_LINUX
72+
#elif defined(__APPLE__) && defined(__MACH__)
73+
#define ODE_PLATFORM_OSX
74+
#elif defined(__FreeBSD__)
75+
#define ODE_PLATFORM_FREEBSD
76+
#else
77+
#error "Need some help identifying the platform!"
78+
#endif
79+
80+
/* Additional platform defines used in the code */
81+
#if defined(ODE_PLATFORM_WINDOWS) && !defined(WIN32)
82+
#define WIN32
83+
#endif
84+
85+
#if defined(__CYGWIN32__) || defined(__MINGW32__)
86+
#define CYGWIN
87+
#endif
88+
89+
#if defined(ODE_PLATFORM_OSX)
90+
#define macintosh
91+
#endif
92+
93+
#ifdef HAVE_ALLOCA_H
94+
#include <alloca.h>
95+
#endif
96+
97+
#ifdef HAVE_MALLOC_H
98+
#include <malloc.h>
99+
#endif
100+
101+
#ifdef HAVE_STDINT_H
102+
#include <stdint.h>
103+
#endif
104+
105+
#ifdef HAVE_INTTYPES_H
106+
#include <inttypes.h>
107+
#endif
108+
109+
#include "typedefs.h"
110+
111+
#endif // ODE_CONFIG_H

include/double/ode/precision.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _ODE_PRECISION_H_
2+
#define _ODE_PRECISION_H_
3+
4+
#define dDOUBLE
5+
6+
#endif

include/double/ode/version.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _ODE_VERSION_H_
2+
#define _ODE_VERSION_H_
3+
4+
#define dODE_VERSION "0.16.0"
5+
6+
#endif

include/double/template.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#define TRANSLATE_C
2+
#include <ode/ode.h>

include/single/ode/precision.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _ODE_PRECISION_H_
2+
#define _ODE_PRECISION_H_
3+
4+
#define dSINGLE
5+
6+
#endif

include/single/ode/version.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _ODE_VERSION_H_
2+
#define _ODE_VERSION_H_
3+
4+
#define dODE_VERSION "0.16.0"
5+
6+
#endif

include/single/template.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#define TRANSLATE_C
2+
#include <ode/ode.h>

src/ode-double.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Backing package for ODE (single precision).
2+
//! Is imported by ode.zig via a package name
3+
pub const real = f64;

src/ode-single.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Backing package for ODE (single precision).
2+
//! Is imported by ode.zig via a package name
3+
pub const real = f32;

0 commit comments

Comments
 (0)