Commit f687a062 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Update Makefile

parent c59aace7
DEBUG = 0
TARGET_NAME := minivmac
CORE_DIR := .
ifeq ($(platform),)
platform = unix
......@@ -14,9 +15,11 @@ else ifneq ($(findstring win,$(shell uname -a)),)
endif
endif
TARGET_NAME := minivmac
ifeq ($(platform), unix)
CC = gcc
TARGET := libretro-minivmac.so
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -fPIC
......@@ -38,8 +41,6 @@ else ifeq ($(platform), classic_armv7_a7)
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
-fmerge-all-constants -fno-math-errno \
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
CXXFLAGS += $(CFLAGS)
CPPFLAGS += $(CFLAGS)
ASFLAGS += $(CFLAGS)
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
......@@ -53,12 +54,12 @@ else ifeq ($(platform), classic_armv7_a7)
#######################################
else ifeq ($(platform), osx)
TARGET := libretro.dylib
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
SHARED := -dynamiclib
else
CC = gcc
TARGET := libretro-minivmac.dll
TARGET := $(TARGET_NAME)_libretro.dll
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=libretro/link.T -Wl,--no-undefined
endif
......@@ -68,50 +69,57 @@ else
CFLAGS += -O3
endif
EMU = minivmac/minivmac/src
GLUE = minivmac
CORE_SRCS = \
$(EMU)/MINEM68K.o \
$(EMU)/GLOBGLUE.o \
$(EMU)/M68KITAB.o \
$(EMU)/VIAEMDEV.o \
$(EMU)/VIA2EMDV.o \
$(EMU)/IWMEMDEV.o \
$(EMU)/SCCEMDEV.o \
$(EMU)/RTCEMDEV.o \
$(EMU)/ROMEMDEV.o \
$(EMU)/SCSIEMDV.o \
$(EMU)/SONYEMDV.o \
$(EMU)/SCRNEMDV.o \
$(EMU)/VIDEMDEV.o \
$(EMU)/ADBEMDEV.o \
$(EMU)/ASCEMDEV.o \
$(EMU)/MOUSEMDV.o \
$(EMU)/PROGMAIN.o \
$(GLUE)/MYOSGLUE.o
BUILD_APP = $(CORE_SRCS)
HINCLUDES := -I./$(EMU) -I./$(GLUE) -Ilibretro
OBJECTS := libretro/libretro-vmac.o libretro/vmac-mapper.o libretro/vkbd.o \
libretro/graph.o libretro/diskutils.o libretro/fontmsx.o \
$(BUILD_APP)
CFLAGS += -DMAC2=1 -std=gnu99 -O3 -finline-functions -funroll-loops -fsigned-char \
-Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-strength-reduce -fno-builtin -finline-functions -s -fPIC
CXXFLAGS += $(CFLAGS) -std=gnu++0x
CPPFLAGS += $(CFLAGS)
LDFLAGS += -lm
SOURCES_C := \
$(CORE_DIR)/minivmac/minivmac/src/MINEM68K.c \
$(CORE_DIR)/minivmac/minivmac/src/GLOBGLUE.c \
$(CORE_DIR)/minivmac/minivmac/src/M68KITAB.c \
$(CORE_DIR)/minivmac/minivmac/src/VIAEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/VIA2EMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/IWMEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/RTCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ROMEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCSIEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/SONYEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCRNEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/VIDEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ADBEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ASCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/MOUSEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/PROGMAIN.c \
$(CORE_DIR)/minivmac/MYOSGLUE.c \
$(CORE_DIR)/libretro/libretro-vmac.c \
$(CORE_DIR)/libretro/vmac-mapper.c \
$(CORE_DIR)/libretro/vkbd.c \
$(CORE_DIR)/libretro/graph.c \
$(CORE_DIR)/libretro/diskutils.c \
$(CORE_DIR)/libretro/fontmsx.c
HINCLUDES := -I$(CORE_DIR)/minivmac/minivmac/src \
-I$(CORE_DIR)/minivmac \
-I$(CORE_DIR)/libretro
OBJECTS := $(SOURCES_C:.c=.o)
CFLAGS += -DMAC2=1 \
-std=gnu99 \
-O3 \
-finline-functions \
-funroll-loops \
-fsigned-char \
-Wno-strict-prototypes \
-ffast-math \
-fomit-frame-pointer \
-fno-strength-reduce \
-fno-builtin \
-finline-functions
LDFLAGS += -lm
all: $(TARGET)
$(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
@echo "** BUILD SUCCESSFUL! GG NO RE **"
%.o: %.c
$(CC) $(CFLAGS) $(HINCLUDES) -c -o $@ $<
......
......@@ -12,7 +12,6 @@
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#define CanGetAppPath 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment