-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 732 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (26 loc) · 732 Bytes
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
PRJNAME=lapps
MAINSRC=src/$(PRJNAME).cpp
DEPDIR=bin
OUTDIR=trg
OUTDIRBIN=$(OUTDIR)/bin
CXX=g++
CXXFLAGS=-std=c++20
CXXFLAGSREL=$(CXXFLAGS) -static -O2 -s -g0 -DNDEBUG
CXXFLAGSDEB=$(CXXFLAGS) -O0 -g -DDEBUG
LDLIBS=
.PHONY: all
all: clean debug
debug:
@mkdir -p $(OUTDIRBIN)
@echo "Compile : $(MAINSRC) -> $(OUTDIRBIN)/$(PRJNAME)"
@ $(CXX) $(CXXFLAGSDEB) -o $(OUTDIRBIN)/$(PRJNAME) $(MAINSRC) $(LDLIBS)
@mkdir -p $(DEPDIR)
@ cp $(OUTDIRBIN)/$(PRJNAME) $(DEPDIR)
release: clean
@mkdir -p $(OUTDIRBIN)
@echo "Compile : $(MAINSRC) -> $(OUTDIRBIN)/$(PRJNAME)"
@ $(CXX) $(CXXFLAGSREL) -o $(OUTDIRBIN)/$(PRJNAME) $(MAINSRC) $(LDLIBS)
@mkdir -p $(DEPDIR)
@ cp $(OUTDIRBIN)/$(PRJNAME) $(DEPDIR)
clean:
@rm -rf $(OUTDIR)