mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
Add support for MorphOS
This commit is contained in:
@@ -69,8 +69,7 @@ option(DISABLE_JSON_PATCH "Disable JSON patch (RFC6902) support."
|
|||||||
option(NEWLOCALE_NEEDS_FREELOCALE "Work around newlocale bugs in old FreeBSD by calling freelocale" OFF)
|
option(NEWLOCALE_NEEDS_FREELOCALE "Work around newlocale bugs in old FreeBSD by calling freelocale" OFF)
|
||||||
option(BUILD_APPS "Default to building apps" ON)
|
option(BUILD_APPS "Default to building apps" ON)
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "AmigaOS")
|
if (AMIGA)
|
||||||
set(AMIGA ON)
|
|
||||||
set(DISABLE_THREAD_LOCAL_STORAGE ON)
|
set(DISABLE_THREAD_LOCAL_STORAGE ON)
|
||||||
set(ENABLE_THREADING OFF)
|
set(ENABLE_THREADING OFF)
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
@@ -79,7 +78,6 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "AmigaOS")
|
|||||||
if ($ENV{CROSS_PFX} STREQUAL "m68k-amigaos")
|
if ($ENV{CROSS_PFX} STREQUAL "m68k-amigaos")
|
||||||
set(AMIGA_M68K ON)
|
set(AMIGA_M68K ON)
|
||||||
set(BUILD_TESTING OFF)
|
set(BUILD_TESTING OFF)
|
||||||
message(STATUS "Building for Motorola 68k AmigaOS")
|
|
||||||
if (${M68K_CRT} STREQUAL "newlib")
|
if (${M68K_CRT} STREQUAL "newlib")
|
||||||
set(NEWLIB ON)
|
set(NEWLIB ON)
|
||||||
elseif(${M68K_CRT} STREQUAL "clib2")
|
elseif(${M68K_CRT} STREQUAL "clib2")
|
||||||
@@ -93,9 +91,19 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "AmigaOS")
|
|||||||
else()
|
else()
|
||||||
set(NEWLIB ON)
|
set(NEWLIB ON)
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "Building for Motorola 68k AmigaOS using CRT: ${M68K_CRT}")
|
||||||
elseif ($ENV{CROSS_PFX} STREQUAL "ppc-amigaos")
|
elseif ($ENV{CROSS_PFX} STREQUAL "ppc-amigaos")
|
||||||
set(AMIGA_PPC ON)
|
set(AMIGA_PPC ON)
|
||||||
message(STATUS "Building for PowerPC AmigaOS")
|
message(STATUS "Building for PowerPC AmigaOS")
|
||||||
|
elseif($ENV{CROSS_PFX} STREQUAL "ppc-morphos")
|
||||||
|
set(MORPHOS ON)
|
||||||
|
if (NOIXEMUL)
|
||||||
|
message(STATUS "Building for PowerPC MorphOS without ixemul")
|
||||||
|
set(DISABLE_WERROR ON)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -noixemul")
|
||||||
|
else()
|
||||||
|
message(STATUS "Building for PowerPC MorphOS with ixemul")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unsupported AmigaOS target")
|
message(FATAL_ERROR "Unsupported AmigaOS target")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -12,7 +12,7 @@ json-c
|
|||||||
5. [Testing](#testing)
|
5. [Testing](#testing)
|
||||||
6. [Building with `vcpkg`](#buildvcpkg)
|
6. [Building with `vcpkg`](#buildvcpkg)
|
||||||
7. [Building for Android](#android)
|
7. [Building for Android](#android)
|
||||||
8. [Building for Commodore Amiga](#amiga)
|
8. [Building for Commodore Amiga or MorphOS](#amiga)
|
||||||
9. [Linking to libjson-c](#linking)
|
9. [Linking to libjson-c](#linking)
|
||||||
10. [Using json-c](#using)
|
10. [Using json-c](#using)
|
||||||
|
|
||||||
@@ -272,10 +272,10 @@ make install
|
|||||||
```
|
```
|
||||||
|
|
||||||
<a name="amiga"></a>
|
<a name="amiga"></a>
|
||||||
Building for Commodore Amiga
|
Building for Commodore Amiga or MorphOS
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Building for Commodore Amiga is supported for both Motorola 68k (AmigaOS 3) and PowerPC (AmigaOS 4) architectures. You can set up a cross compiler locally, however it is much easier to use the already preconfigured Amiga development environment wtthin a Docker container.
|
Building for Commodore Amiga is supported for both Motorola 68k (AmigaOS 3) and PowerPC (AmigaOS 4) architectures. MorphOS on compatible PowerPC hardware is also supported. You can set up a cross compiler locally, however it is much easier to use the already preconfigured Amiga development environment wtthin a Docker container.
|
||||||
|
|
||||||
Install Docker on your machine if you don't already have it. You can download Docker Desktop for Windows/macOS/Linux [here](https://www.docker.com/products/docker-desktop/).
|
Install Docker on your machine if you don't already have it. You can download Docker Desktop for Windows/macOS/Linux [here](https://www.docker.com/products/docker-desktop/).
|
||||||
|
|
||||||
@@ -311,6 +311,23 @@ make
|
|||||||
|
|
||||||
libjson-c.a will get created in the build directory.
|
libjson-c.a will get created in the build directory.
|
||||||
|
|
||||||
|
### To build for PowerPC MorphOS:
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir build
|
||||||
|
docker run --rm \
|
||||||
|
-v ${PWD}:/work \
|
||||||
|
-e USER=$( id -u ) -e GROUP=$( id -g ) \
|
||||||
|
-it sacredbanana/amiga-compiler:ppc-morphos bash
|
||||||
|
cd build
|
||||||
|
cmake -DNOIXEMUL=1 ..
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are making an application that absolutely requires ixemul, then remove the `-DNOIXEMUL=1`.
|
||||||
|
|
||||||
|
libjson-c.a will get created in the build directory.
|
||||||
|
|
||||||
<a name="linking"></a>
|
<a name="linking"></a>
|
||||||
Linking to `libjson-c`
|
Linking to `libjson-c`
|
||||||
----------------------
|
----------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user