-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
74 lines (61 loc) · 2.63 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
# -----------------------------------------------------------------------------
# CMake project wrapper Makefile ----------------------------------------------
# -----------------------------------------------------------------------------
# This file is automatically generated from the template in Scripts/Makefile.in
# Make any changes needed to the template.
SHELL := /bin/bash
RM := rm -rf
MKDIR := mkdir -p
BUILDROOT := /mnt/d/PBA/base/Build
BUILDDEFAULT := Release
RELATIVEPATH := Projects/2DFluidSim
BUILDDIR = $(BUILDROOT)/$(BUILDDEFAULT)/$(RELATIVEPATH)
ROOTDIR := /mnt/d/PBA/base
BUILDTYPES := Release MinSizeRel Debug Coverage RelWithDebInfo Quick
OTHERGOALS := $(filter-out distclean $(BUILDTYPES),$(MAKECMDGOALS))
# Call make from build directory
.PHONY: all
all: $(BUILDROOT)/$(BUILDDEFAULT)/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: Release
Release: BUILDDIR = $(BUILDROOT)/Release/$(RELATIVEPATH)
Release: $(BUILDROOT)/Release/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: MinSizeRel
MinSizeRel: BUILDDIR = $(BUILDROOT)/MinSizeRel/$(RELATIVEPATH)
MinSizeRel: $(BUILDROOT)/MinSizeRel/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: RelWithDebInfo
RelWithDebInfo: BUILDDIR = $(BUILDROOT)/RelWithDebInfo/$(RELATIVEPATH)
RelWithDebInfo: $(BUILDROOT)/RelWithDebInfo/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: Debug
Debug: BUILDDIR = $(BUILDROOT)/Debug/$(RELATIVEPATH)
Debug: $(BUILDROOT)/Debug/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: Coverage
Coverage: BUILDDIR = $(BUILDROOT)/Coverage/$(RELATIVEPATH)
Coverage: $(BUILDROOT)/Coverage/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Call make from build directory
.PHONY: Quick
Quick: BUILDDIR = $(BUILDROOT)/Quick/$(RELATIVEPATH)
Quick: $(BUILDROOT)/Quick/$(RELATIVEPATH)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
# Make build directory and call cmake
$(BUILDROOT)/%/$(RELATIVEPATH)/Makefile:
@ ($(MKDIR) $(BUILDROOT)/$* > /dev/null)
@ (cd $(BUILDROOT)/$* > /dev/null 2>&1 && cmake -DCMAKE_BUILD_TYPE=$* $(ROOTDIR))
# for all other goals pass them down to make in the build directory
ifeq ($(filter $(BUILDTYPES),$(MAKECMDGOALS)),)
$(OTHERGOALS): $(BUILDDIR)/Makefile
@ $(MAKE) -s -C $(BUILDDIR) $(MAKEFLAGS) $(OTHERGOALS)
else
$(OTHERGOALS):
@true
endif