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:
- 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)
endif
include $(DEVKITPPC)/base_rules
ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
else
include $(DEVKITPPC)/wii_rules
endif
NULLSTR :=
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)
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := grrlib

View file

@ -10,6 +10,12 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif
ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
else
include $(DEVKITPPC)/wii_rules
endif
# FreeType Makefile
PROJECT := freetype
PROJECT_TITLE := FreeType
@ -17,10 +23,6 @@ TOP_DIR ?= .
OBJ_DIR ?= $(TOP_DIR)
include $(TOP_DIR)/builds/toplevel.mk
LIBOGC_INC := $(DEVKITPRO)/libogc/include
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
clean :
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
# fully.
# devkitPPC base rules
include $(DEVKITPPC)/base_rules
# Compiler command line name
#
COMPILER_SEP := $(SEP)
@ -60,7 +57,6 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS ?= -c -O2 -Wall $(MACHDEP) -I$(TOP_DIR)/include
# 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)
endif
include $(DEVKITPPC)/base_rules
LIBOGC_INC := $(DEVKITPRO)/libogc/include
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
ifeq ($(PLATFORM),cube)
include $(DEVKITPPC)/gamecube_rules
else
include $(DEVKITPPC)/wii_rules
endif
INCLUDE :=
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS := -O2 $(MACHDEP) $(INCLUDE)
LIB := jpeg

View file

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

View file

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

View file

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

View file

@ -90,7 +90,7 @@ libpngu is supplied as source code
libpng is supplied as source code
libz 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