diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2009-12-31 10:36:02 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2009-12-31 10:36:02 +0200 |
commit | b95d5e2079786e8435f6afc176b3b8b80043b868 (patch) | |
tree | 1883cae288fff133b969d4cd4f34b3675bb65621 | |
parent | 9504f0418dd0f3a9e6dff6034ffe36196c473a06 (diff) |
Added Makefiles to build the project
-rw-r--r-- | Makefile | 27 | ||||
-rw-r--r-- | tests/Makefile | 21 |
2 files changed, 48 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7e9ea9a --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +QMAKE = qmake +MAKEFILE = libresourceqt.make +LIB = build/libresourceqt.so.1.0.0 + +%.make: %.pro + $(QMAKE) -o $@ $< + +clean: $(MAKEFILE) + $(MAKE) -f $(MAKEFILE) clean + cd tests; $(MAKE) clean + $(RM) $(MAKEFILE) + $(RM) -r build + +all: $(MAKEFILE) + $(MAKE) -f $(MAKEFILE) all + cd tests; $(MAKE) all + +install: $(MAKEFILE) + $(MAKE) -f $(MAKEFILE) install + cd tests; $(MAKE) install + +tests: force + cd tests; $(MAKE) tests + +force: ; + +.phony: clean all install tests diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..f7a97a8 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,21 @@ +QMAKE = qmake +MAKEFILES = $(patsubst %.pro,%.make,$(wildcard *.pro)) + +%.make: %.pro + $(QMAKE) -o $@ $< + +tests: all + find build -type f -name 'test-*' -exec sh -c "if test -x {}; then {}; fi" \; + +clean: $(MAKEFILES) + for makefile in $(MAKEFILES); do make -f "$$makefile" clean; done + $(RM) $(MAKEFILES) + $(RM) -r build + +all: $(MAKEFILES) + for makefile in $(MAKEFILES); do make -f "$$makefile" all; done + +install: $(MAKEFILES) + for makefile in $(MAKEFILES); do make -f "$$makefile" install; done + +.phony: install tests all clean |