Makefiles were changed to allow compilation on GameCube and Wii.

To compile on GameCube use this: make PLATFORM=cube clean all install
If PLATFORM is not specified or set to anything else it will compile for Wii.
This commit is contained in:
Crayon2000 2015-11-03 09:14:13 -05:00
parent 5b61d78f59
commit ee94dd4dac
9 changed files with 34 additions and 35 deletions

View file

@ -16,4 +16,5 @@ install:
script: script:
- cd GRRLIB && sudo -E make clean all install && cd .. - cd GRRLIB && sudo -E make clean all install && cd ..
- cd examples && make && cd .. - cd examples && make && cd ..
- cd GRRLIB && sudo -E make PLATFORM=cube clean all && cd ..

View file

@ -10,16 +10,16 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
include $(DEVKITPPC)/base_rules ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
else
include $(DEVKITPPC)/wii_rules
endif
NULLSTR := NULLSTR :=
PWD := $(subst $(NULLSTR) ,\ ,$(shell pwd)) PWD := $(subst $(NULLSTR) ,\ ,$(shell pwd))
LIBOGC_INC := $(DEVKITPRO)/libogc/include
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
INCLUDE := -I../lib/jpeg -I../lib/pngu -I../lib/freetype/include -I$(PWD) -I$(LIBOGC_INC) INCLUDE := -I../lib/jpeg -I../lib/pngu -I../lib/freetype/include -I$(PWD) -I$(LIBOGC_INC)
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE) CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := grrlib LIB := grrlib

View file

@ -10,6 +10,12 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
else
include $(DEVKITPPC)/wii_rules
endif
# FreeType Makefile # FreeType Makefile
PROJECT := freetype PROJECT := freetype
PROJECT_TITLE := FreeType PROJECT_TITLE := FreeType
@ -17,10 +23,6 @@ TOP_DIR ?= .
OBJ_DIR ?= $(TOP_DIR) OBJ_DIR ?= $(TOP_DIR)
include $(TOP_DIR)/builds/toplevel.mk include $(TOP_DIR)/builds/toplevel.mk
LIBOGC_INC := $(DEVKITPRO)/libogc/include
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
clean : clean :
rm -f lib$(PROJECT).a ftmodule.h rm -f lib$(PROJECT).a ftmodule.h

View file

@ -9,9 +9,6 @@
# indicate that you have read the license and understand and accept it # indicate that you have read the license and understand and accept it
# fully. # fully.
# devkitPPC base rules
include $(DEVKITPPC)/base_rules
# Compiler command line name # Compiler command line name
# #
COMPILER_SEP := $(SEP) COMPILER_SEP := $(SEP)
@ -60,7 +57,6 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore # Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance. # ANSI compliance.
# #
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS ?= -c -O2 -Wall $(MACHDEP) -I$(TOP_DIR)/include CFLAGS ?= -c -O2 -Wall $(MACHDEP) -I$(TOP_DIR)/include
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.

View file

@ -10,13 +10,13 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
include $(DEVKITPPC)/base_rules ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
LIBOGC_INC := $(DEVKITPRO)/libogc/include else
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii include $(DEVKITPPC)/wii_rules
endif
INCLUDE := INCLUDE :=
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 $(MACHDEP) $(INCLUDE) CFLAGS := -O2 $(MACHDEP) $(INCLUDE)
LIB := jpeg LIB := jpeg

View file

@ -10,13 +10,13 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
include $(DEVKITPPC)/base_rules ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
LIBOGC_INC := $(DEVKITPRO)/libogc/include else
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii include $(DEVKITPPC)/wii_rules
endif
INCLUDE := -I../zlib -I$(LIBOGC_INC) INCLUDE := -I../zlib -I$(LIBOGC_INC)
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE) CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := png LIB := png

View file

@ -10,13 +10,13 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
include $(DEVKITPPC)/base_rules ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
LIBOGC_INC := $(DEVKITPRO)/libogc/include else
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii include $(DEVKITPPC)/wii_rules
endif
INCLUDE := -I../zlib -I../png -I$(LIBOGC_INC) INCLUDE := -I../zlib -I../png -I$(LIBOGC_INC)
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE) CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := pngu LIB := pngu

View file

@ -10,13 +10,13 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro) $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
include $(DEVKITPPC)/base_rules ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
LIBOGC_INC := $(DEVKITPRO)/libogc/include else
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii include $(DEVKITPPC)/wii_rules
endif
INCLUDE := INCLUDE :=
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE) CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := zlib LIB := zlib

View file

@ -90,7 +90,7 @@ libpngu is supplied as source code
libpng is supplied as source code libpng is supplied as source code
libz is supplied as source code libz is supplied as source code
libfreetype is supplied as source code libfreetype is supplied as source code
libfat is supplied with devkitpro (i.e. preinstalled) libfat is supplied with devkitPro (i.e. preinstalled)
``` ```
The easy way is to install GRRLIB and all the required libraries in a single The easy way is to install GRRLIB and all the required libraries in a single