mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-12-23 18:59:19 +00:00
ee94dd4dac
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.
37 lines
909 B
Makefile
37 lines
909 B
Makefile
#---------------------------------------------------------------------------------
|
|
.SUFFIXES:
|
|
#---------------------------------------------------------------------------------
|
|
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC)
|
|
endif
|
|
|
|
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
|
|
|
|
INCLUDE := -I../zlib -I../png -I$(LIBOGC_INC)
|
|
CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
|
|
|
|
LIB := pngu
|
|
CFILES := $(wildcard *.c)
|
|
OFILES := $(CFILES:.c=.o)
|
|
ARC := lib$(LIB).a
|
|
HDR := $(LIB).h
|
|
|
|
all : $(OFILES)
|
|
$(AR) -r $(ARC) $(OFILES)
|
|
|
|
clean :
|
|
rm -f $(OFILES) $(ARC)
|
|
|
|
install :
|
|
mkdir -p $(LIBOGC_LIB) $(LIBOGC_INC)
|
|
cp -f $(ARC) $(LIBOGC_LIB)/
|
|
cp -f $(HDR) $(LIBOGC_INC)/
|