mirror of
https://github.com/libretro/libretro-cap32.git
synced 2026-11-07 11:06:04 -10:00
update cmocka lib as external lib fixes github issue #133
This commit is contained in:
1 parent
0e3edf8ef4
commit
65fd8dc84f
9 files changed
+42
-16
No files matched your search
@@ -21,6 +21,9 @@
|
||||
*.cdt
|
||||
*.m3u
|
||||
|
||||
# external libs
|
||||
external/cmocka/cmocka-lib
|
||||
|
||||
# tests files
|
||||
tests/
|
||||
tests-db/
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
[submodule "cmocka"]
|
||||
path = cmocka
|
||||
url = https://git.cryptomilk.org/projects/cmocka.git
|
||||
branch = master
|
||||
|
||||
@@ -71,7 +71,7 @@ else ifneq (,$(findstring rpi,$(platform)))
|
||||
SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
|
||||
|
||||
ifneq (,$(findstring rpi1,$(platform)))
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16B
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16BPP
|
||||
# Raspberry Pi 1 - Model B (original)
|
||||
ifneq (,$(findstring rpi1bo,$(platform)))
|
||||
CFLAGS += -funsafe-math-optimizations -fsingle-precision-constant -fexpensive-optimizations
|
||||
@@ -97,7 +97,7 @@ else ifneq (,$(findstring evercade,$(platform)))
|
||||
CC = /opt/evercade/usr/bin/arm-linux-gnueabihf-gcc
|
||||
CC_AS = /opt/evercade/usr/bin/arm-linux-gnueabihf-as
|
||||
AR = /opt/evercade/usr/bin/arm-linux-gnueabihf-ar
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16B -DEVERCADE
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16BPP -DEVERCADE
|
||||
CFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math
|
||||
CFLAGS += -funsafe-math-optimizations -fsingle-precision-constant -fexpensive-optimizations
|
||||
@@ -236,7 +236,7 @@ else ifeq ($(platform), ctr)
|
||||
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)
|
||||
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
|
||||
PLATFORM_DEFINES := -DARM11 -D_3DS -DNO_UNALIGNED_ACCESS -DM16B -DLOWRES
|
||||
PLATFORM_DEFINES := -DARM11 -D_3DS -DNO_UNALIGNED_ACCESS -DM16BPP -DLOWRES
|
||||
PLATFORM_DEFINES += -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
||||
PLATFORM_DEFINES += -Wall -mword-relocations
|
||||
PLATFORM_DEFINES += -fomit-frame-pointer -ffast-math
|
||||
@@ -331,7 +331,7 @@ else ifeq ($(platform), retrofw)
|
||||
AR = /opt/retrofw-toolchain/usr/bin/mipsel-linux-ar
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16B
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16BPP
|
||||
CFLAGS += -ffast-math -march=mips32 -mtune=mips32 -mhard-float
|
||||
CFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math
|
||||
@@ -347,7 +347,7 @@ else ifeq ($(platform), miyoo)
|
||||
AR = /opt/miyoo/usr/bin/arm-linux-ar
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16B
|
||||
CFLAGS := -DFRONTEND_SUPPORTS_RGB565 -DLOWRES -DINLINE="inline" -DM16BPP
|
||||
CFLAGS += -ffast-math -march=armv5te -mtune=arm926ej-s
|
||||
CFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math
|
||||
@@ -489,17 +489,17 @@ rmp:
|
||||
|
||||
# unit test lib
|
||||
$(CORE_DIR)/unit-tests/cmocka.o:
|
||||
$(CC) -c -o $(CORE_DIR)/unit-tests/cmocka.o $(CORE_DIR)/cmocka/src/cmocka.c $(CFLAGS) -I$(CORE_DIR)/cmocka/include $(INCDIRS)
|
||||
$(CC) -c -o $(CORE_DIR)/unit-tests/cmocka.o $(CORE_DIR)/external/cmocka/cmocka-lib/src/cmocka.c $(CFLAGS) -I$(CORE_DIR)/external/cmocka/cmocka-lib/include $(INCDIRS)
|
||||
|
||||
# to get more info: make clean && make unit-test DEBUG_TEST=1
|
||||
unit-test: $(CORE_DIR)/unit-tests/cmocka.o $(OBJS)
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/test-utils.o $(CORE_DIR)/unit-tests/test-utils.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/cmocka/include
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/test-utils.o $(CORE_DIR)/unit-tests/test-utils.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/external/cmocka/cmocka-lib/include
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/md5.o $(CORE_DIR)/libretro-common/utils/md5.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/libretro-common/include/utils
|
||||
@$(CC) -o $(CORE_DIR)/unit-tests/autorun $(CORE_DIR)/unit-tests/autorun.c $(OBJS) $(CORE_DIR)/unit-tests/cmocka.o $(CORE_DIR)/unit-tests/md5.o $(CORE_DIR)/unit-tests/test-utils.o $(LDFLAGS) $(TEST_FLAGS) $(CFLAGS) -Wno-unused-function -I$(CORE_DIR)/cmocka/include $(INCDIRS)
|
||||
$(CORE_DIR)/unit-tests/autorun
|
||||
|
||||
unit-test-db: $(CORE_DIR)/unit-tests/cmocka.o $(OBJS)
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/test-utils.o $(CORE_DIR)/unit-tests/test-utils.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/cmocka/include
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/test-utils.o $(CORE_DIR)/unit-tests/test-utils.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/external/cmocka/cmocka-lib/include
|
||||
@$(CC) -c -o $(CORE_DIR)/unit-tests/md5.o $(CORE_DIR)/libretro-common/utils/md5.c $(CFLAGS) -Wno-implicit-function-declaration $(INCDIRS) -I$(CORE_DIR)/libretro-common/include/utils
|
||||
@$(CC) -o $(CORE_DIR)/unit-tests/test-db $(CORE_DIR)/unit-tests/test-db.c $(OBJS) $(CORE_DIR)/unit-tests/cmocka.o $(CORE_DIR)/unit-tests/test-utils.o $(CORE_DIR)/unit-tests/md5.o $(LDFLAGS) $(TEST_FLAGS) $(CFLAGS) -Wno-unused-function -I$(CORE_DIR)/cmocka/include $(INCDIRS)
|
||||
@echo "Now run: $(CORE_DIR)/unit-tests/test-db <full-path-to clean-cpc-db roms>"
|
||||
|
||||
-1
Submodule cmocka deleted from f5e2cd77c8.
@@ -2,3 +2,4 @@ input_player1_key_start = "13"
|
||||
input_player1_key_b = "13"
|
||||
|
||||
entry_hash_1 = 0xcd9dbf9c # (UK) (1984) (Version Basic 1.0) [Amsoft]
|
||||
entry_hash_2 = 0x7a60b38e # (UK) (1985) (Hack - Manic Miner 2) (fix)
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
Project: cmocka, unit testing framework for C
|
||||
URL: https://cmocka.org/
|
||||
License: Apache License 2.0
|
||||
Upstream version: 1.1.5
|
||||
Local modifications: None
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# put here the version you want to use
|
||||
VERSION=cmocka-1.1.5
|
||||
|
||||
echo "*** cmocka git update ($VERSION)"
|
||||
|
||||
# get the latest revision from repository.
|
||||
git clone https://git.cryptomilk.org/projects/cmocka.git cmocka.git
|
||||
if [ -d cmocka.git ]
|
||||
then
|
||||
rm -rf cmocka-lib
|
||||
cd cmocka.git
|
||||
git checkout $VERSION
|
||||
mkdir ../cmocka-lib
|
||||
cp -r include src AUTHORS COPYING README.md ../cmocka-lib/
|
||||
cd ..
|
||||
rm -rf cmocka.git
|
||||
|
||||
echo "cmocka: ready."
|
||||
else
|
||||
echo "Did you install Git?"
|
||||
fi
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../cmocka/include/cmocka.h"
|
||||
#include "cmocka.h"
|
||||
#include "libretro/dsk/loader.h"
|
||||
#include "test-utils.h"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include "../cmocka/include/cmocka.h"
|
||||
#include "cmocka.h"
|
||||
#include "libretro-common/include/utils/md5.h"
|
||||
|
||||
#include "cap32/slots.h"
|
||||
|
||||
Reference in new issue
Block a user