blob: 823791d59cde3658b5d8189195764676d55c6a41 (
plain) (
blame)
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
|
PWD := $(shell pwd)
SDIR := $(PWD)/src
IDIR := $(PWD)/include
ODIR := $(PWD)/bin
SFILES := $(wildcard $(SDIR)/*.cpp)
OFILES := $(patsubst $(SDIR)/%.cpp,$(ODIR)/%.o,$(SFILES))
OUT := systemviewer
GIT_VERSION := "$(shell git describe --abbrev=4 --dirty --always --tags)"
CC := g++
CFLAGS := -std=c++20 -Wall -Wextra -MP -MD -I$(IDIR) -g -Wno-unused
CFLAGS += -DVERSION=\"$(GIT_VERSION)\"
-include $(SDIR/:.cpp=.d)
all: ${OFILES}
$(CC) $(CFLAGS) ${OFILES} -o $(OUT)
clean:
rm ${OFILES}
$(ODIR)/%.o : $(SDIR)/%.cpp
$(CC) $(CFLAGS) -c $< -o $@
|