diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2020-06-18 19:35:11 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2020-06-18 19:35:11 -0400 |
commit | 6473b57cefe4c13cb262ed78bf0e49fe18a20267 (patch) | |
tree | 339cd8492b9bc055330037f7d6a0036415de902f /gui/Makefile | |
parent | 65b755658c62c8cf608c0ba46af4607fd7c74cc5 (diff) |
using serial lib, can connect to device
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) |