next release will be 1.0.10
[libfat.git] / Makefile
blob2bc70326069b1643d4c89b26a1a4f83f777cbae1
1 ifeq ($(strip $(DEVKITPRO)),)
2 $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
3 endif
5 export TOPDIR := $(CURDIR)
7 export LIBFAT_MAJOR := 1
8 export LIBFAT_MINOR := 0
9 export LIBFAT_PATCH := 10
11 export VERSTRING := $(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)
14 default: release
16 all: release dist
18 release: include/libfatversion.h nds-release gba-release cube-release wii-release
20 ogc-release: cube-release wii-release
22 nds-release:
23 $(MAKE) -C nds BUILD=release
25 gba-release:
26 $(MAKE) -C gba BUILD=release
28 cube-release:
29 $(MAKE) -C libogc PLATFORM=cube BUILD=cube_release
31 wii-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
38 nds-debug:
39 $(MAKE) -C nds BUILD=debug
41 gba-debug:
42 $(MAKE) -C gba BUILD=debug
45 cube-debug:
46 $(MAKE) -C libogc PLATFORM=cube BUILD=wii_debug
48 wii-debug:
49 $(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug
51 clean: nds-clean gba-clean ogc-clean
53 nds-clean:
54 $(MAKE) -C nds clean
56 gba-clean:
57 $(MAKE) -C gba clean
59 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__" >> $@
88 @echo >> $@
89 @echo "#define _LIBFAT_MAJOR_ $(LIBFAT_MAJOR)" >> $@
90 @echo "#define _LIBFAT_MINOR_ $(LIBFAT_MINOR)" >> $@
91 @echo "#define _LIBFAT_PATCH_ $(LIBFAT_PATCH)" >> $@
92 @echo >> $@
93 @echo '#define _LIBFAT_STRING "libFAT Release '$(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)'"' >> $@
94 @echo >> $@
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