-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
79 lines (62 loc) · 1.66 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
79
ifndef STREAMSYS
STREAMSYS := $(CURDIR)
endif
LOGINFILE = streamlogin
FASTRULES = clean
LIBDIR = lib
.PHONY: all baselib go4lib $(FASTRULES)
ifdef GO4SYS
IS_GO4=true
else
ifneq ($(shell go4-config --go4sys 2>/dev/null),)
IS_GO4=true
endif
endif
ifdef ROOTSYS
IS_ROOT=true
else
ifneq ($(shell root-config --version 2>/dev/null),)
IS_ROOT=true
endif
endif
all: baselib go4lib
baselib: $(LIBDIR) $(LOGINFILE)
cd framework; $(MAKE) STREAMSYS=..
go4lib: baselib
ifdef IS_GO4
cd go4engine; $(MAKE) STREAMSYS=..
else
@echo "Go4 not configured - not able to build go4 engine"
endif
clean:
ifdef IS_GO4
cd go4engine; $(MAKE) clean STREAMSYS=..
else
@rm -f go4engine/G__*.* go4engine/*.o go4engine/*.d
endif
cd framework; $(MAKE) clean STREAMSYS=..
@rm -rf $(LIBDIR) $(LOGINFILE)
@echo "stream project clean done"
$(LIBDIR):
@(if [ ! -d $(LIBDIR) ] ; then mkdir -p $(LIBDIR); fi)
$(LOGINFILE):
@rm -f $@
@echo "# this is generated file, use it to configure enviroment" >> $@
@echo "# just type '. ./streamlogin' in shell, not forget space in between" >> $@
@echo "" >> $@
@echo "echo Configure stream v0.10.0 at $(STREAMSYS)" >> $@
@echo "" >> $@
@echo 'export STREAMSYS=$(STREAMSYS)' >> $@
ifdef IS_GO4
@echo 'export GO4EXTRAINCLUDE=$$STREAMSYS/include' >> $@
@echo 'export ROOT_INCLUDE_PATH=$$STREAMSYS/go4engine:$$STREAMSYS/include:$$ROOT_INCLUDE_PATH' >> $@
else
ifdef IS_ROOT
@echo 'export ROOT_INCLUDE_PATH=$$STREAMSYS/include:$$ROOT_INCLUDE_PATH' >> $@
endif
endif
ifeq ($(shell uname),Darwin)
@echo 'export DYLD_LIBRARY_PATH=.:$$STREAMSYS/lib:$$DYLD_LIBRARY_PATH' >> $@
else
@echo 'export LD_LIBRARY_PATH=.:$$STREAMSYS/lib:$$LD_LIBRARY_PATH' >> $@
endif