forked from AliceO2Group/FlpPrototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (32 loc) · 1.16 KB
/
Makefile
File metadata and controls
46 lines (32 loc) · 1.16 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
#SUBDIRS := $(patsubst %/.,%,$(wildcard */.))
SUBDIRS := InfoLogger Configuration Monitoring DataFormat DataSampling projectTemplate QualityControl
CONFIGSUBDIRS = $(SUBDIRS:%=config-%)
INSTALLSUBDIRS = $(SUBDIRS:%=install-%)
CLEANSUBDIRS = $(SUBDIRS:%=clean-%)
CLOBBERSUBDIRS = $(SUBDIRS:%=clobber-%)
.PHONY: all clean package install test subdirs $(SUBDIRS) $(CONFIGSUBDIRS) $(INSTALLSUBDIRS) $(CLEANSUBDIRS) $(CLOBBERSUBDIRS)
default: all
all: configure build
build: configure $(SUBDIRS)
configure: $(CONFIGSUBDIRS)
install: $(INSTALLSUBDIRS)
clean: $(CLEANSUBDIRS)
clobber: $(CLOBBERSUBDIRS)
test:
@echo $(SUBDIRS)
@echo $(CONFIGSUBDIRS)
$(SUBDIRS):
@echo Build $@
@cd $@/build ; $(MAKE)
$(CONFIGSUBDIRS):
@echo Configure $(@:config-%=%)
@cd $(@:config-%=%) ; mkdir -p build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug ..
$(INSTALLSUBDIRS): $(CONFIGSUBDIRS)
@echo Install $(@:install-%=%)
@cd $(@:install-%=%)/build ; make install
$(CLEANSUBDIRS):
@echo Clean $(@:clean-%=%)
@cd $(@:clean-%=%)/build ; make clean
$(CLOBBERSUBDIRS):
@echo Delete build directory in $(@:clobber-%=%)
@cd $(@:clobber-%=%) ; rm -rf build