2006-07-14 04:42:37 +02:00
|
|
|
ifeq ($(strip $(DEVKITPRO)),)
|
|
|
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
|
|
|
|
endif
|
|
|
|
|
|
|
|
export TOPDIR := $(CURDIR)
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
export LIBFAT_MAJOR := 1
|
|
|
|
export LIBFAT_MINOR := 0
|
2009-10-27 01:55:26 +01:00
|
|
|
export LIBFAT_PATCH := 6
|
2008-12-13 12:43:53 +01:00
|
|
|
|
|
|
|
export VERSTRING := $(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)
|
|
|
|
|
2006-07-14 04:42:37 +02:00
|
|
|
|
|
|
|
default: release
|
|
|
|
|
|
|
|
all: release dist
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
release: include/libfatversion.h nds-release gba-release cube-release wii-release
|
2008-05-01 11:57:23 +02:00
|
|
|
|
|
|
|
ogc-release: cube-release wii-release
|
|
|
|
|
|
|
|
nds-release:
|
|
|
|
$(MAKE) -C nds BUILD=release
|
|
|
|
|
|
|
|
gba-release:
|
|
|
|
$(MAKE) -C gba BUILD=release
|
|
|
|
|
|
|
|
cube-release:
|
|
|
|
$(MAKE) -C libogc PLATFORM=cube BUILD=cube_release
|
|
|
|
|
|
|
|
wii-release:
|
|
|
|
$(MAKE) -C libogc PLATFORM=wii BUILD=wii_release
|
|
|
|
|
|
|
|
debug: nds-debug gba-debug cube-debug wii-debug
|
|
|
|
|
|
|
|
ogc-debug: cube-debug wii-debug
|
|
|
|
|
|
|
|
nds-debug:
|
|
|
|
$(MAKE) -C nds BUILD=debug
|
|
|
|
|
|
|
|
gba-debug:
|
|
|
|
$(MAKE) -C gba BUILD=debug
|
|
|
|
|
|
|
|
|
|
|
|
cube-debug:
|
|
|
|
$(MAKE) -C libogc PLATFORM=cube BUILD=wii_debug
|
|
|
|
|
|
|
|
wii-debug:
|
|
|
|
$(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug
|
|
|
|
|
|
|
|
clean: nds-clean gba-clean ogc-clean
|
|
|
|
|
|
|
|
nds-clean:
|
|
|
|
$(MAKE) -C nds clean
|
|
|
|
|
|
|
|
gba-clean:
|
|
|
|
$(MAKE) -C gba clean
|
|
|
|
|
|
|
|
ogc-clean:
|
|
|
|
$(MAKE) -C libogc clean
|
|
|
|
|
|
|
|
dist-bin: nds-dist-bin gba-dist-bin ogc-dist-bin
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
nds-dist-bin: nds-release distribute/$(VERSTRING)
|
2008-05-01 11:57:23 +02:00
|
|
|
$(MAKE) -C nds dist-bin
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
gba-dist-bin: gba-release distribute/$(VERSTRING)
|
2008-05-01 11:57:23 +02:00
|
|
|
$(MAKE) -C gba dist-bin
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
ogc-dist-bin: ogc-release distribute/$(VERSTRING)
|
2008-05-01 11:57:23 +02:00
|
|
|
$(MAKE) -C libogc dist-bin
|
2006-07-14 04:42:37 +02:00
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
dist-src: distribute/$(VERSTRING)
|
2009-05-01 02:36:01 +02:00
|
|
|
@tar --exclude=.svn --exclude=*CVS* -cvjf distribute/$(VERSTRING)/libfat-src-$(VERSTRING).tar.bz2 \
|
2006-07-14 04:42:37 +02:00
|
|
|
source include Makefile \
|
|
|
|
nds/Makefile nds/include \
|
2008-03-16 19:06:25 +01:00
|
|
|
gba/Makefile gba/include \
|
2008-05-01 11:57:23 +02:00
|
|
|
libogc/Makefile libogc/include
|
2006-07-14 04:42:37 +02:00
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
dist: include/libfatversion.h dist-bin dist-src
|
2006-07-14 04:42:37 +02:00
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
distribute/$(VERSTRING):
|
2006-07-14 04:42:37 +02:00
|
|
|
@[ -d $@ ] || mkdir -p $@
|
|
|
|
|
2008-12-13 12:43:53 +01:00
|
|
|
include/libfatversion.h : Makefile
|
|
|
|
@echo "#ifndef __LIBFATVERSION_H__" > $@
|
|
|
|
@echo "#define __LIBFATVERSION_H__" >> $@
|
|
|
|
@echo >> $@
|
|
|
|
@echo "#define _LIBFAT_MAJOR_ $(LIBFAT_MAJOR)" >> $@
|
|
|
|
@echo "#define _LIBFAT_MINOR_ $(LIBFAT_MINOR)" >> $@
|
|
|
|
@echo "#define _LIBFAT_PATCH_ $(LIBFAT_PATCH)" >> $@
|
|
|
|
@echo >> $@
|
|
|
|
@echo '#define _LIBFAT_STRING "libFAT Release '$(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)'"' >> $@
|
|
|
|
@echo >> $@
|
|
|
|
@echo "#endif // __LIBFATVERSION_H__" >> $@
|
2006-07-14 04:42:37 +02:00
|
|
|
|
2008-05-01 11:57:23 +02:00
|
|
|
install: nds-install gba-install ogc-install
|
|
|
|
|
|
|
|
nds-install: nds-release
|
2008-12-23 14:01:47 +01:00
|
|
|
$(MAKE) -C nds install
|
2008-05-01 11:57:23 +02:00
|
|
|
|
|
|
|
gba-install: gba-release
|
2008-12-23 14:01:47 +01:00
|
|
|
$(MAKE) -C gba install
|
2008-05-01 11:57:23 +02:00
|
|
|
|
|
|
|
ogc-install: cube-release wii-release
|
2008-12-23 14:01:47 +01:00
|
|
|
$(MAKE) -C libogc install
|