Skip to content

Commit

Permalink
Merge from libretro/master:46902e0 for repo synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
irixxxx committed Dec 5, 2020
1 parent 9d1ecde commit 61d7699
Show file tree
Hide file tree
Showing 74 changed files with 14,043 additions and 2,094 deletions.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
*.o
*.swp
*.dll
*.lib
*.pdb
*.manifest
*.map
*.exp
*.dylib
*.so
*.a
tags
cscope.out
PicoDrive.map
config.mak
config.log
cpu/musashi/m68kmake
Expand All @@ -22,4 +30,3 @@ PicoDrive.opk
pico_int_offs.h
amalgamate
textfilter

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "platform/libpicofe"]
path = platform/libpicofe
url = https://github.com/irixxxx/libpicofe.git
url = https://github.com/notaz/libpicofe.git
[submodule "cpu/cyclone"]
path = cpu/cyclone
url = https://github.com/notaz/cyclone68000.git
Expand Down
28 changes: 26 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$(LD) ?= $(CC)
TARGET ?= PicoDrive
DEBUG ?= 0
CFLAGS += -I.
CYCLONE_CC ?= gcc
CYCLONE_CXX ?= g++

all: config.mak target_

Expand Down Expand Up @@ -38,6 +41,9 @@ endif
ifeq "$(DEBUG)" "0"
CFLAGS += -O3 -DNDEBUG
endif
LD = $(CC)
OBJOUT ?= -o
LINKOUT ?= -o
endif

ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","gp2x" "opendingux" "rpi1"))
Expand Down Expand Up @@ -153,6 +159,15 @@ HAVE_ARMv6 = 0
endif
ifeq "$(PLATFORM)" "libretro"
OBJS += platform/libretro/libretro.o
ifeq "$(USE_LIBRETRO_VFS)" "1"
OBJS += platform/libretro/libretro-common/compat/compat_posix_string.o
OBJS += platform/libretro/libretro-common/compat/compat_strl.o
OBJS += platform/libretro/libretro-common/compat/fopen_utf8.o
OBJS += platform/libretro/libretro-common/encodings/encoding_utf.o
OBJS += platform/libretro/libretro-common/streams/file_stream.o
OBJS += platform/libretro/libretro-common/streams/file_stream_transforms.o
OBJS += platform/libretro/libretro-common/vfs/vfs_implementation.o
endif
PLATFORM_ZLIB = 1
endif

Expand Down Expand Up @@ -217,9 +232,10 @@ CFLAGS += -DUSE_SDL
endif

ifneq ($(findstring gcc,$(CC)),)
ifneq ($(findstring SunOS,$(shell uname -a)),SunOS)
LDFLAGS += -Wl,-Map=$(TARGET).map
endif

endif

target_: $(TARGET)

Expand All @@ -228,10 +244,11 @@ clean:
$(RM) -r .opk_data

$(TARGET): $(OBJS)

ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $^
else
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS)
$(LD) $(LINKOUT)$@ $^ $(LDFLAGS) $(LDLIBS)
endif

pprof: platform/linux/pprof.c
Expand All @@ -240,6 +257,9 @@ pprof: platform/linux/pprof.c
pico/pico_int_offs.h: tools/mkoffsets.sh
make -C tools/ XCC="$(CC)" XCFLAGS="$(CFLAGS)" XPLATFORM="$(platform)"

%.o: %.c
$(CC) -c $(OBJOUT)$@ $< $(CFLAGS)

.s.o:
$(CC) $(CFLAGS) -c $< -o $@

Expand Down Expand Up @@ -269,7 +289,11 @@ endif
# not using O3 and -fno-expensive-optimizations seems to also help, but you may
# want to remove this stuff for better performance if your compiler can handle it
ifeq "$(DEBUG)" "0"
ifeq (,$(findstring msvc,$(platform)))
cpu/fame/famec.o: CFLAGS += -g0 -O2 -fno-expensive-optimizations
else
cpu/fame/famec.o: CFLAGS += -Od
endif
endif

pico/carthw_cfg.c: pico/carthw.cfg
Expand Down
Loading

0 comments on commit 61d7699

Please sign in to comment.