-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (61 loc) · 3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif
export TOPDIR := $(CURDIR)
export LIBNDS_MAJOR := 1
export LIBNDS_MINOR := 6
export LIBNDS_PATCH := 2
VERSION := $(LIBNDS_MAJOR).$(LIBNDS_MINOR).$(LIBNDS_PATCH)
.PHONY: release debug clean all docs
all: include/nds/libversion.h release debug
#-------------------------------------------------------------------------------
release: lib
#-------------------------------------------------------------------------------
$(MAKE) -C arm9 BUILD=release || { exit 1;}
$(MAKE) -C arm7 BUILD=release || { exit 1;}
#-------------------------------------------------------------------------------
debug: lib
#-------------------------------------------------------------------------------
$(MAKE) -C arm9 BUILD=debug || { exit 1;}
$(MAKE) -C arm7 BUILD=debug || { exit 1;}
#-------------------------------------------------------------------------------
lib:
#-------------------------------------------------------------------------------
mkdir lib
#-------------------------------------------------------------------------------
clean:
#-------------------------------------------------------------------------------
@$(MAKE) -C arm9 clean
@$(MAKE) -C arm7 clean
#-------------------------------------------------------------------------------
dist-src:
#-------------------------------------------------------------------------------
@tar --exclude=*CVS* --exclude=.svn -cjf libnds-src-$(VERSION).tar.bz2 arm7/Makefile arm9/Makefile source include icon.bmp Makefile libnds_license.txt libnds.dox
#-------------------------------------------------------------------------------
dist-bin: all
#-------------------------------------------------------------------------------
@tar --exclude=*CVS* --exclude=.svn -cjf libnds-$(VERSION).tar.bz2 include lib icon.bmp libnds_license.txt
dist: dist-bin dist-src
#-------------------------------------------------------------------------------
install: dist-bin
#-------------------------------------------------------------------------------
mkdir -p $(DEVKITPRO)/libnds
bzip2 -cd libnds-$(VERSION).tar.bz2 | tar -xf - -C $(DEVKITPRO)/libnds
#---------------------------------------------------------------------------------
docs:
#---------------------------------------------------------------------------------
doxygen libnds.dox
cat warn.log
#---------------------------------------------------------------------------------
include/nds/libversion.h : Makefile
#---------------------------------------------------------------------------------
@echo "#ifndef __LIBNDSVERSION_H__" > $@
@echo "#define __LIBNDSVERSION_H__" >> $@
@echo >> $@
@echo "#define _LIBNDS_MAJOR_ $(LIBNDS_MAJOR)" >> $@
@echo "#define _LIBNDS_MINOR_ $(LIBNDS_MINOR)" >> $@
@echo "#define _LIBNDS_PATCH_ $(LIBNDS_PATCH)" >> $@
@echo >> $@
@echo '#define _LIBNDS_STRING "libNDS Release '$(LIBNDS_MAJOR).$(LIBNDS_MINOR).$(LIBNDS_PATCH)'"' >> $@
@echo >> $@
@echo "#endif // __LIBNDSVERSION_H__" >> $@