aboutsummaryrefslogtreecommitdiffstats
path: root/gui/Makefile
blob: 20dd4734c30bb8ea5b4afd6ce881cfd9e5b817ad (plain)
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
CXX = g++-10
CXXFLAGS = --std=c++20 -ggdb -O0 \
           -Wall -Wextra -pedantic \
           -Wno-deprecated-copy \
           -Iserial/include \
           $(shell wx-config --cxxflags)

CXXFILES = serial/src/serial.cc \
           serial/src/impl/unix.cc \
           serial/src/impl/list_ports/list_ports_linux.cc \
           $(wildcard *.cpp)
OFILES = $(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(CXXFILES)))

LIBS = $(shell wx-config --libs) -lwx_gtk3u_stc-3.1
OUTELF = stmdspgui

all: $(OUTELF)

$(OUTELF): $(OFILES)
	@echo "  CXX    " $(OUTELF)
	@$(CXX) $(CXXFLAGS) $(OFILES) $(LIBS) -o $(OUTELF)

.cc.o:
	@echo "  CXX    " $<
	@$(CXX) $(CXXFLAGS) -c $< -o $@

.cpp.o:
	@echo "  CXX    " $<
	@$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	@echo "  CLEAN"
	@rm -f $(OUTELF) $(OFILES)