-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (32 loc) · 1.27 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
DEPENDENCIES =
PACKAGEDEPENDENCIES = build-essential
DEBUGFLAGS = -Wall -Wextra -g -fsanitize=address
EXECDIR = Debug/
CC = g++ -std=c++11
CFLAGS = -c $(DEBUGFLAGS) $(RELEASEFLAGS)
LDFLAGS = $(DEBUGFLAGS)
BUILDDIR = Build/
EXECNAME = rdcalc
#----------------------------------BUILDING--------------------------------------------------
all: mkdir main
$(CC) $(LDFLAGS) $(BUILDDIR)main.o $(BUILDDIR)librd_calculator.o -o $(EXECDIR)$(EXECNAME)
mkdir:
mkdir -p Debug/ Release/ Build/
main: librd_calculator
$(CC) $(CFLAGS) main.cpp -o $(BUILDDIR)main.o
#----------------------------------librd_calculator------------------------------------------
librd_calculator:
$(CC) $(CFLAGS) rd_calculator.cpp -o $(BUILDDIR)librd_calculator.o
#----------------------------------INSTALLING DEPENDENCIES-----------------------------------
install-dependencies:
cd .. && git clone $(DEPENDENCIES)
install-dependencies-all: install-dependencies
sudo $(PACKAGEMANAGER) install $(PACKAGEDEPENDENCIES)
#----------------------------------RUNNING---------------------------------------------------
run:
./$(EXECDIR)$(EXECNAME) 2> /dev/null
rund:
./$(EXECDIR)$(EXECNAME)
#-----------------------------------CLEANING-------------------------------------------------
clean:
rm -rf Debug/ Release/ Build/