diff options
Diffstat (limited to 'gui/Makefile')
-rw-r--r-- | gui/Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gui/Makefile b/gui/Makefile index a53d412..99a0243 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -2,18 +2,30 @@ CXX = g++-10 CXXFLAGS = --std=c++20 -ggdb -Og \ -Wall -Wextra -pedantic \ -Wno-deprecated-copy \ + -Iserial/include \ $(shell wx-config --cxxflags) -CXXFILES = $(wildcard *.cpp) +CXXFILES = $(shell find serial/src -name "*.cc") $(wildcard *.cpp) +OFILES = $(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(CXXFILES))) LIBS = $(shell wx-config --libs) OUTELF = stmdspgui -all: $(CXXFILES) - @echo " CXX " $(CXXFILES) - @$(CXX) $(CXXFLAGS) $(CXXFILES) $(LIBS) -o $(OUTELF) +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) + @rm -f $(OUTELF) $(OFILES) |