Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework C++ makefiles #25

Merged
merged 3 commits into from
Nov 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
C++: Examples: update Makefile
Add multi-thread build in Makefile
Now each example can be build separately
  • Loading branch information
Igor Anokhin committed Nov 17, 2017
commit 8f0c1dff2f59e9b5c155b85cb9d78c3aa1997e6c
26 changes: 10 additions & 16 deletions C++/Examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
MODULES = AccelGyroMag ADC AHRS Barometer FRAM GPS LED Multithread Servo RCInput
MODULES = $(wildcard */*.cpp)
EXE = $(MODULES:.cpp=)


all: $(EXE)

%: %.cpp
$(MAKE) -C $(@D) all


all:
cd ../Navio; \
($(MAKE) ); \
cd ../Examples; \
for dir in $(MODULES); do \
cd $$dir; \
($(MAKE) ); \
cd ..; \
done

clean:
for dir in $(MODULES); do \
cd $$dir; \
($(MAKE) clean); \
cd ..; \
done
rm $(EXE)