-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
executable file
·80 lines (65 loc) · 1.8 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
80
# Filename: Makefile
# Description: Makefile for building EG2 analysis tools
# Author: Latif Kabir < latif@jlab.org >
# Created: Wed Nov 15 01:00:17 2017 (-0500)
# URL: latifkabir.github.io
ifndef STARHOME
$(error $$STARHOME environment variable not defined. source setup.[c]sh first)
endif
# directories
LIB_DIR = libBrStar
ANA_DIR = analysis
MACRO_DIR = runMacros
DIFFANA_DIR = diffAnalysis
EMJANA_DIR = emJetAnalysis
STDANA_DIR = studentsAna
STARSIM_DIR = starSim
# makefile name
MAKE_FILE = Makefile
####### Build rules
first: all
.PHONY: lib ana cons macro diff emj sim
all: lib ana cons macro diff emj ucr sim
@echo "done!"
lib:
$(MAKE) -C $(LIB_DIR) -f $(MAKE_FILE)
@cp -ur $(LIB_DIR)/lib/*.so lib
ana: lib
$(MAKE) -C $(ANA_DIR) -f $(MAKE_FILE)
@cp -ur $(ANA_DIR)/lib/*.so lib
diff: lib
$(MAKE) -C $(DIFFANA_DIR) -f $(MAKE_FILE)
@cp -ur $(DIFFANA_DIR)/lib/*.so lib
macro: cons
$(MAKE) -C $(MACRO_DIR) -f $(MAKE_FILE)
@cp -ur $(MACRO_DIR)/lib/*.so lib
emj: #cons
$(MAKE) -C $(EMJANA_DIR) -f $(MAKE_FILE)
@cp -ur $(EMJANA_DIR)/lib/*.so lib
ucr:
$(MAKE) -C $(STDANA_DIR) -f $(MAKE_FILE)
@cp -ur $(STDANA_DIR)/lib/*.so lib
sim:
$(MAKE) -C $(STARSIM_DIR) -f $(MAKE_FILE)
@cp -ur $(STARSIM_DIR)/lib/*.so lib
cons:
cons
####### Clean
clean: cleanlib cleanana cleanmacro cleancons cleansim cleanucr
.PHONY: cleanlib cleanana cleandiff cleanmacro cleanemj cleansim
cleanlib:
$(MAKE) -C $(LIB_DIR) -f $(MAKE_FILE) clean
cleanana:
$(MAKE) -C $(ANA_DIR) -f $(MAKE_FILE) clean
cleandiff:
$(MAKE) -C $(DIFFANA_DIR) -f $(MAKE_FILE) clean
cleanmacro:
$(MAKE) -C $(MACRO_DIR) -f $(MAKE_FILE) clean
cleanemj:
$(MAKE) -C $(EMJANA_DIR) -f $(MAKE_FILE) clean
cleanucr:
$(MAKE) -C $(STDANA_DIR) -f $(MAKE_FILE) clean
cleansim:
$(MAKE) -C $(STARSIM_DIR) -f $(MAKE_FILE) clean
cleancons:
rm -r .${STAR_HOST_SYS}/*