Skip to content

Commit

Permalink
C++: Examples: add auto-dependency libnavio in examples
Browse files Browse the repository at this point in the history
When files change in libnavio, it will recompile
  • Loading branch information
Igor Anokhin authored and staroselskii committed Nov 17, 2017
1 parent 6048ea9 commit 421294f
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions C++/Examples/ADC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) -std=gnu++11 $(INCLUDES) ADC.cpp -L$(NAVIO) -lnavio -o ADC

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/AHRS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) -std=c++11 $(INCLUDES) AHRS.cpp -L$(NAVIO) -lnavio -o AHRS -lrt -lpthread

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/AccelGyroMag/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) -std=c++11 $(INCLUDES) -L$(NAVIO) AccelGyroMag.cpp -lnavio -o AccelGyroMag

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/Barometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) $(INCLUDES) Barometer.cpp -L$(NAVIO) -lnavio -o Barometer

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/FRAM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CC) $(INCLUDES) FRAM.cpp -L$(NAVIO) -lnavio -o FRAM

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/GPS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) -std=c++11 $(INCLUDES) gps.cpp -L$(NAVIO) -lnavio -o gps
rm -rf *.o

Expand Down
1 change: 1 addition & 0 deletions C++/Examples/LED/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ INCLUDES = -I ../../Navio
CFLAGS = -std=c++11

all:
$(MAKE) -C ../../Navio all
$(CXX) $(CFLAGS) $(INCLUDES) -L$(NAVIO) LED.cpp -lnavio -o LED

clean:
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/Multithread/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CC) $(INCLUDES) threaded_baro.cpp -L$(NAVIO) -lnavio -lpthread -o threaded_baro

clean:
Expand Down
3 changes: 2 additions & 1 deletion C++/Examples/RCInput/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ LIB = -L$(PIGPIO_PATH)
INCLUDES = -I ../../Navio -I$(PIGPIO_PATH)

all:
$(CXX) -std=gnu++11 $(INCLUDES) $(LIB) main.cpp -L$(NAVIO) -lnavio -o RCInput -lrt -lpthread -lpigpio || $(MAKE) pigpio
$(MAKE) -C ../../Navio all
$(CXX) -std=gnu++11 $(INCLUDES) $(LIB) RCInput.cpp -L$(NAVIO) -lnavio -o RCInput -lrt -lpthread -lpigpio || $(MAKE) pigpio

clean:
rm RCInput
Expand Down
1 change: 1 addition & 0 deletions C++/Examples/Servo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NAVIO = ../../Navio
INCLUDES = -I ../../Navio

all:
$(MAKE) -C ../../Navio all
$(CXX) -std=gnu++11 $(INCLUDES) Servo.cpp -L$(NAVIO) -lnavio -o Servo

clean:
Expand Down

0 comments on commit 421294f

Please sign in to comment.