aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 7aa95dbb89c54c01bebb8c333d395a408ff6e89b (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
35
CXXFILES := \
    source/serial/src/serial.cc \
    source/serial/src/impl/unix.cc \
    source/serial/src/impl/list_ports/list_ports_linux.cc \
    $(wildcard source/imgui/backends/*.cpp) \
    $(wildcard source/imgui/*.cpp) \
    $(wildcard source/stmdsp/*.cpp) \
    $(wildcard source/*.cpp)

OFILES := $(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(CXXFILES)))
OUTPUT := stmdspgui

#CXXFLAGS := -std=c++20 -O2 \
#            -Isource -Isource/imgui -Isource/stmdsp -Isource/serial/include
CXXFLAGS := -std=c++20 -ggdb -O0 -g3 \
            -Isource -Isource/imgui -Isource/stmdsp -Isource/serial/include

all: $(OUTPUT)

$(OUTPUT): $(OFILES)
	@echo "  LD    " $(OUTPUT)
	@g++ $(OFILES) -o $(OUTPUT) -lSDL2 -lGL -lpthread

clean:
	@echo "  CLEAN"
	@rm $(OFILES) $(OUTPUT)

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

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