1 ifeq ($(strip $(DEVKITPRO
)),)
2 $(error
"Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
5 export TOPDIR := $(CURDIR)
7 export LIBFAT_MAJOR := 1
8 export LIBFAT_MINOR := 0
9 export LIBFAT_PATCH := 5
11 export VERSTRING := $(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)
18 release: include/libfatversion.h nds-release gba-release cube-release wii-release
20 ogc-release: cube-release wii-release
23 $(MAKE) -C nds BUILD=release
26 $(MAKE) -C gba BUILD=release
29 $(MAKE) -C libogc PLATFORM=cube BUILD=cube_release
32 $(MAKE) -C libogc PLATFORM=wii BUILD=wii_release
34 debug: nds-debug gba-debug cube-debug wii-debug
36 ogc-debug: cube-debug wii-debug
39 $(MAKE) -C nds BUILD=debug
42 $(MAKE) -C gba BUILD=debug
46 $(MAKE) -C libogc PLATFORM=cube BUILD=wii_debug
49 $(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug
51 clean: nds-clean gba-clean ogc-clean
60 $(MAKE) -C libogc clean
62 dist-bin: nds-dist-bin gba-dist-bin ogc-dist-bin
64 nds-dist-bin: nds-release distribute/$(VERSTRING)
65 $(MAKE) -C nds dist-bin
67 gba-dist-bin: gba-release distribute/$(VERSTRING)
68 $(MAKE) -C gba dist-bin
70 ogc-dist-bin: ogc-release distribute/$(VERSTRING)
71 $(MAKE) -C libogc dist-bin
73 dist-src: distribute/$(VERSTRING)
74 @tar --exclude=.svn --exclude=*CVS* -cvjf distribute/$(VERSTRING)/libfat-src-$(VERSTRING).tar.bz2 \
75 source include Makefile \
76 nds/Makefile nds/include \
77 gba/Makefile gba/include \
78 libogc/Makefile libogc/include
80 dist: include/libfatversion.h dist-bin dist-src
82 distribute/$(VERSTRING):
83 @[ -d $@ ] || mkdir -p $@
85 include/libfatversion.h : Makefile
86 @echo "#ifndef __LIBFATVERSION_H__" > $@
87 @echo
"#define __LIBFATVERSION_H__" >> $@
89 @echo
"#define _LIBFAT_MAJOR_ $(LIBFAT_MAJOR)" >> $@
90 @echo
"#define _LIBFAT_MINOR_ $(LIBFAT_MINOR)" >> $@
91 @echo
"#define _LIBFAT_PATCH_ $(LIBFAT_PATCH)" >> $@
93 @echo
'#define _LIBFAT_STRING "libFAT Release '$(LIBFAT_MAJOR
).
$(LIBFAT_MINOR
).
$(LIBFAT_PATCH
)'"' >> $@
95 @echo
"#endif // __LIBFATVERSION_H__" >> $@
97 install: nds-install gba-install ogc-install
99 nds-install
: nds-release
100 $(MAKE
) -C nds
install
102 gba-install
: gba-release
103 $(MAKE
) -C gba
install
105 ogc-install
: cube-release wii-release
106 $(MAKE
) -C libogc
install