-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
99 lines (73 loc) · 2.04 KB
/
makefile
File metadata and controls
99 lines (73 loc) · 2.04 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
SUBDIRS = src libraries
ALLDIRS = $(SUBDIRS)
PLATFORM = $(shell uname)
export PLATFORM:= $(PLATFORM)
export CFLAGS = -std=c++0x -O2 -I$(PWD)/include -g
#export CFLAGS = -std=c++11 -O2 -I$(PWD)/include -g
ifeq ($(PLATFORM),Darwin)
export __APPLE__:= 1
export CFLAGS += -DOS_DARWIN -DHAVE_ZLIB -I/usr/X11/include #-lz
export CFLAGS += `root-config --cflags`
export LFLAGS = -dynamiclib -undefined dynamic_lookup -single_module #
export SHAREDSWITCH = -install_name # ENDING SPACE
export CPP = g++
else
export __LINUX__:= 1
export CFLAGS += `root-config --cflags`
export SHAREDSWITCH = -shared -Wl,-soname,#NO ENDING SPACE
export CPP = g++
endif
export COMPILESHARED = $(CPP) $(LFLAGS) $(SHAREDSWITCH)#NO ENDING SPACE
export BASE:= $(CURDIR)
export CAT=cat
export OK_STRING="[OK]"
export ERROR_STRING="[ERROR]"
export WARN_STRING="[WARNING]"
export COMP_STRING="Now Compiling "
export FIN_STRING="Finished Building "
export COM_COLOR=\033[0;34m
export OBJ_COLOR=\033[0;36m
export DICT_COLOR=\033[0;36m
export OK_COLOR=\033[0;32m
export ERROR_COLOR=\033[0;31m
export WARN_COLOR=\033[0;33m
export NO_COLOR=\033[m
export FIN_COLOR=\033[3;34m
export FIN_OBJ_COLOR=\033[3;32m
MAKE=make --no-print-directory
.PHONY: all subdirs $(ALLDIRS) clean util
all: print subdirs bin grethist grscope end
#docs: print subdirs bin grsihist grsisort html end
util:
@$(MAKE) -C $@
print:
@echo "Compiling on $(PLATFORM)"
subdirs: $(SUBDIRS)
src: print libraries
$(ALLDIRS):
@$(MAKE) -C $@
grscope: src
@mv $</$@ bin/$@
@cp util/gret-config bin/
bin:
ifeq ($(wildcard ./bin),)
@mkdir bin
endif
grethist:
ifeq ($(wildcard ./.geb_history),)
@touch .grut_history
endif
#html: libraries grsisort
# @printf " ${COM_COLOR}Building ${OBJ_COLOR} HTML Documentation ${NO_COLOR}\n"
# @root -b -q util/html_generator.C >/dev/null
# @$(RM) tempfile.out
end: grscope
@printf " ${WARN_COLOR}Compilation Success. woohoo!${NO_COLOR}\n\n"
clean:
@$(RM) *~
$(RM) ./bin/grutinizer
@for dir in $(ALLDIRS); do \
$(MAKE) -C $$dir $@; \
done
#veryclean: clean
# $(RM) -r ./htmldoc