Skip to content

Commit

Permalink
Build rules for Genode platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmry committed Nov 25, 2018
1 parent 51cf69a commit 12da10f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ else ifeq ($(shell uname -p),ppc)
endif

TARGET_NAME := mrboom
LIBM = -lm

ifeq ($(ARCHFLAGS),)
ifeq ($(archs),ppc)
Expand Down Expand Up @@ -239,6 +238,17 @@ else ifeq ($(platform), classic_armv7_a7)
endif
#######################################

else ifeq ($(platform), genode)
TARGET := $(TARGET_NAME)_libretro.lib.so
CC := $(shell pkg-config genode-base --variable=cc)
CXX := $(shell pkg-config genode-base --variable=cxx)
LD := $(shell pkg-config genode-base --variable=ld)
CFLAGS += $(shell pkg-config --cflags genode-libc)
CXXFLAGS += $(shell pkg-config --cflags genode-stdcxx)
LDFLAGS += -shared --version-script=link.T
LDFLAGS += $(shell pkg-config --libs genode-lib genode-libc genode-stdcxx)
LIBM =

# Windows MSVC 2003 Xbox 1
else ifeq ($(platform), xbox1_msvc2003)
TARGET := $(TARGET_NAME)_libretro_xdk1.lib
Expand Down Expand Up @@ -299,6 +309,7 @@ else
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=$(CORE_DIR)/link.T -Wl,--no-undefined
endif

LIBM ?= -lm
LDFLAGS += $(LIBM)

ifneq ($(LOAD_FROM_FILES),)
Expand Down Expand Up @@ -352,7 +363,7 @@ CFLAGS += -DAITEST
endif
endif

CXXFLAGS := $(CFLAGS) $(INCFLAGS) -Wall -pedantic $(fpic)
CXXFLAGS += $(CFLAGS) $(INCFLAGS) -Wall -pedantic $(fpic)

ifneq ($(LIBSDL2),)
CXXFLAGS += -std=c++11
Expand Down Expand Up @@ -382,8 +393,12 @@ $(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
ifeq ($(platform),genode)
$(LD) -o $@ $(OBJECTS) $(LDFLAGS)
else
$(CXX) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
endif
endif
@echo "** BUILD SUCCESSFUL! GG NO RE **"

Expand Down

0 comments on commit 12da10f

Please sign in to comment.