-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (25 loc) · 840 Bytes
/
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
CPPC = g++
Main_Path = ./src/main.cpp
Build_Dir = ./build/
Final_Name = CLI_Timer
Build_Path = $(Build_Dir)$(Final_Name)
Install_Path = /bin/$(Final_Name)
STD ?= 2b
OPTLVL ?= -O3
CPPFLAGS = -Wall -Wextra -Wpedantic
all:
mkdir -p $(Build_Dir)
$(CPPC) $(CPPFLAGS) $(OPTLVL) -std=c++$(STD) -o $(Build_Path) $(Main_Path)
# This was for cross compiling to windows however, the multi threading is impossible.
# cross:
# mkdir -p $(Build_Dir)
# $(TARGET): $(TARGET).cpp
# $(CPPC) $(CPPFLAGS) -o $(Build_Path) $(Main_Path)
# x86_64-w64-mingw32-g++ $(CPPFLAGS) -o $(Build_Path)_Windows.exe $(Main_Path) -static-libgcc -static-libstdc++
debug:
mkdir -p $(Build_Dir)
$(CPPC) $(CPPFLAGS) -ggdb -O0 -o $(Build_Path) $(Main_Path)
install:
cp $(Build_Path) $(Install_Path)
uninstall:
rm $(Install_Path)