mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 02:08:16 +00:00
Add Makefile for filters (needs to be made crossplatform later)
This commit is contained in:
parent
927ffa7ea3
commit
4cd1094151
@ -18,6 +18,10 @@
|
||||
#include "softfilter.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#define softfilter_get_implementation twoxbr_get_implementation
|
||||
#endif
|
||||
|
||||
#define TWOXBR_SCALE 2
|
||||
|
||||
static uint8_t initialized = 0;
|
||||
|
60
gfx/filters/Makefile
Normal file
60
gfx/filters/Makefile
Normal file
@ -0,0 +1,60 @@
|
||||
compiler := gcc
|
||||
extra_flags :=
|
||||
use_neon := 0
|
||||
|
||||
ifndef platform
|
||||
platform := $(shell $(compiler) -dumpmachine)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(platform)))
|
||||
extra_flags += -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon
|
||||
use_neon := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring hardfloat,$(platform)))
|
||||
extra_flags += -mfloat-abi=hard
|
||||
endif
|
||||
|
||||
ifeq (release,$(build))
|
||||
extra_flags += -O2
|
||||
endif
|
||||
|
||||
ifeq (debug,$(build))
|
||||
extra_flags += -O0 -g
|
||||
endif
|
||||
|
||||
cc := $(compiler)
|
||||
cpp := $(subst cc,++,$(compiler)) -std=gnu++0x
|
||||
flags := -fPIC $(extra_flags)
|
||||
asflags := -fPIC $(extra_flags)
|
||||
ldflags := -shared -Wl,--version-script=link.T
|
||||
objects :=
|
||||
flags += -std=c99
|
||||
|
||||
|
||||
ifeq (1,$(use_neon))
|
||||
ASMFLAGS := -INEON/asm
|
||||
asflags += -mfpu=neon
|
||||
endif
|
||||
|
||||
objects += 2xbr.so darken.so scale2x.so
|
||||
|
||||
all: build;
|
||||
|
||||
%.o: %.S
|
||||
$(cc) -c -o $@ $(asflags) $(ASMFLAGS) $<
|
||||
|
||||
%.o: %.c
|
||||
$(cc) -c -o $@ $(flags) $<
|
||||
|
||||
%.so: %.o
|
||||
$(cc) -o $@ $(ldflags) $(flags) $^
|
||||
|
||||
build: $(objects)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.so
|
||||
|
||||
strip:
|
||||
strip -s *.so
|
@ -20,6 +20,10 @@
|
||||
#include "softfilter.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#define softfilter_get_implementation darken_get_implementation
|
||||
#endif
|
||||
|
||||
static unsigned darken_input_fmts(void)
|
||||
{
|
||||
return SOFTFILTER_FMT_XRGB8888 | SOFTFILTER_FMT_RGB565;
|
||||
|
4
gfx/filters/link.T
Normal file
4
gfx/filters/link.T
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
global: softfilter_*;
|
||||
local: *;
|
||||
};
|
@ -18,6 +18,10 @@
|
||||
#include "softfilter.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#define softfilter_get_implementation scale2x_get_implementation
|
||||
#endif
|
||||
|
||||
#define SCALE2X_SCALE 2
|
||||
|
||||
#define SCALE2X_GENERIC(width, height, first, last, src, src_stride, dst, dst_stride) \
|
||||
|
Loading…
Reference in New Issue
Block a user