Skip to content

Commit

Permalink
Made MakeFile more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-Rover committed Sep 27, 2023
1 parent 9b63f06 commit 54e2110
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
all: can serial
.PHONE: all clean

can:
all: burt_can/burt_can.so libserialport.so

burt_can/burt_can.so: burt_can/*.h burt_can/*.cpp burt_can/*.hpp
make -C burt_can shared

clean:
rm -f *.o *.so *.exp *.lib *.obj *.out
rm -f burt_can/*.so
rm -f libserialport/*.so
rm -f ../*.so

Expand All @@ -19,6 +22,6 @@ SerialCommand += -fPIC # Position-independent code. Useful for shared libraries
SerialCommand += -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow # Misc options
SerialCommand += -shared -o libserialport.so # Output to a shared library

serial:
libserialport.so: libserialport/serialport.c libserialport/timing.c libserialport/linux.c libserialport/linux_termios.c
$(SerialCommand)
sudo cp libserialport.so /usr/lib

0 comments on commit 54e2110

Please sign in to comment.