]> Chaos Git - corbenik/ctrulib.git/commitdiff
one Makefile to rule them all
authorDave Murphy <davem@devkitpro.org>
Sat, 3 Jan 2015 00:25:00 +0000 (00:25 +0000)
committerDave Murphy <davem@devkitpro.org>
Sat, 3 Jan 2015 00:25:00 +0000 (00:25 +0000)
examples/Makefile [new file with mode: 0644]
examples/graphics/Makefile [new file with mode: 0644]
examples/graphics/printing/Makefile [new file with mode: 0644]
examples/templates/Makefile [new file with mode: 0644]

diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644 (file)
index 0000000..756d82d
--- /dev/null
@@ -0,0 +1,26 @@
+SUBDIRS:= $(shell ls | egrep -v '^(CVS)$$')
+
+DATESTRING     :=      $(shell date +%Y)$(shell date +%m)$(shell date +%d)
+
+#---------------------------------------------------------------------------------
+all: examples
+#---------------------------------------------------------------------------------
+       @rm -fr bin
+       @mkdir -p bin
+       @find . -name "*.3dsx" -exec cp -fv {} bin \;
+
+examples:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i || { exit 1;} fi; done;
+
+#---------------------------------------------------------------------------------
+clean:
+#---------------------------------------------------------------------------------
+       @rm -fr bin
+       @rm -f *.bz2
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i clean || { exit 1;} fi; done;
+
+#---------------------------------------------------------------------------------
+dist: clean
+#---------------------------------------------------------------------------------
+       @rm -fr bin
+       @tar --exclude=.svn --exclude=*CVS* -cvjf 3ds-examples-$(DATESTRING).tar.bz2 *
diff --git a/examples/graphics/Makefile b/examples/graphics/Makefile
new file mode 100644 (file)
index 0000000..bce05ec
--- /dev/null
@@ -0,0 +1,7 @@
+SUBDIRS:= `ls | egrep -v '^(CVS)$$'`
+all:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i || { exit 1;} fi; done;
+clean:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i clean || { exit 1;} fi; done;
+install:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i install || { exit 1;} fi; done;
diff --git a/examples/graphics/printing/Makefile b/examples/graphics/printing/Makefile
new file mode 100644 (file)
index 0000000..bce05ec
--- /dev/null
@@ -0,0 +1,7 @@
+SUBDIRS:= `ls | egrep -v '^(CVS)$$'`
+all:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i || { exit 1;} fi; done;
+clean:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i clean || { exit 1;} fi; done;
+install:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i install || { exit 1;} fi; done;
diff --git a/examples/templates/Makefile b/examples/templates/Makefile
new file mode 100644 (file)
index 0000000..bce05ec
--- /dev/null
@@ -0,0 +1,7 @@
+SUBDIRS:= `ls | egrep -v '^(CVS)$$'`
+all:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i || { exit 1;} fi; done;
+clean:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i clean || { exit 1;} fi; done;
+install:
+       @for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE)  -C $$i install || { exit 1;} fi; done;