1 | |
---|
2 | bindir = @bindir@ |
---|
3 | datadir = @datadir@ |
---|
4 | datarootdir = @datarootdir@ |
---|
5 | exec_prefix = @exec_prefix@ |
---|
6 | includedir = @includedir@ |
---|
7 | libdir = @libdir@ |
---|
8 | mandir = @mandir@ |
---|
9 | prefix = @prefix@ |
---|
10 | srcdir = @srcdir@ |
---|
11 | |
---|
12 | INSTALL = @INSTALL@ |
---|
13 | SHELL = @SHELL@ |
---|
14 | MKDIR_P = @MKDIR_P@ |
---|
15 | RM = rm -f |
---|
16 | VPATH = $(srcdir) |
---|
17 | |
---|
18 | build_date := $(shell date +%Y%m%d) |
---|
19 | machine := $(shell uname -m | sed 's/\ //') |
---|
20 | os := $(shell uname -s) |
---|
21 | |
---|
22 | pkg_path := $(shell dirname $(prefix)) |
---|
23 | pkg_name := $(shell basename $(prefix)) |
---|
24 | |
---|
25 | rappture_binary_tarfile = rappture-$(os)-$(machine)-$(build_date).tar.gz |
---|
26 | rappture_source_tarfile = rappture-src-$(build_date).tar.gz |
---|
27 | runtime_source_tarfile = rappture-runtime-src-$(build_date).tar.gz |
---|
28 | |
---|
29 | runtime_repo = https://repo.nanohub.org/svn/rappture-runtime/trunk |
---|
30 | rappture_repo = https://repo.nanohub.org/svn/rappture/trunk |
---|
31 | |
---|
32 | ENABLE_GUI = @ENABLE_GUI@ |
---|
33 | HAVE_FFMPEG = @HAVE_FFMPEG_LIBS@ |
---|
34 | TARGETS = src lang lib |
---|
35 | |
---|
36 | ifneq ($(ENABLE_GUI),) |
---|
37 | TARGETS += gui builder tester examples |
---|
38 | endif |
---|
39 | ifeq ($(HAVE_FFMEG),) |
---|
40 | TARGETS += video |
---|
41 | endif |
---|
42 | |
---|
43 | .PHONY: $(TARGETS) |
---|
44 | |
---|
45 | all: $(TARGETS) |
---|
46 | for i in $(TARGETS) ; do \ |
---|
47 | $(MAKE) -C $$i all || exit 1 ;\ |
---|
48 | done |
---|
49 | test: |
---|
50 | $(MAKE) -C test all |
---|
51 | |
---|
52 | install: |
---|
53 | for i in $(TARGETS) ; do \ |
---|
54 | $(MAKE) -C $$i install || exit 1 ;\ |
---|
55 | done |
---|
56 | |
---|
57 | clean: |
---|
58 | for i in $(TARGETS) ; do \ |
---|
59 | $(MAKE) -C $$i clean || exit 1 ;\ |
---|
60 | done |
---|
61 | |
---|
62 | distclean: clean |
---|
63 | $(RM) Makefile config.status config.log *~ |
---|
64 | for i in $(TARGETS) ; do \ |
---|
65 | $(MAKE) -C $$i distclean || exit 1 ;\ |
---|
66 | done |
---|
67 | |
---|
68 | package: |
---|
69 | tar -C $(pkg_path) -czlf $(rappture_binary_tarfile) $(pkg_name) |
---|
70 | |
---|
71 | distrib: |
---|
72 | $(RM) -r exported |
---|
73 | $(MKDIR_P) -m 0755 exported |
---|
74 | (cd exported; svn export -q $(rappture_repo) rappture) |
---|
75 | tar -C exported -czlf $(rappture_source_tarfile) rappture |
---|
76 | $(RM) -r exported |
---|
77 | |
---|
78 | runtime-distrib: |
---|
79 | $(RM) -r exported |
---|
80 | $(MKDIR_P) -m 0755 exported |
---|
81 | (cd exported; svn export -q $(runtime_repo) runtime) |
---|
82 | tar -C exported -czlf $(runtime_source_tarfile) runtime |
---|
83 | $(RM) -r exported |
---|