my makefile:
DRIVER_SRC = PumaDriver.cpp PumaBody.cpp PumaMotor.cpp base_manipulation.cpp serialPort.cpp
DRIVER_INC = PumaDriver.h PumaBody.h PumaMotor.h base_manipulation.h serialPort.h silvermax_commands.h
All: $(DRI_SRC) $(DRI_INC)
g++ -Wall -Wextra -g3 -fpic `pkg-config --cflags playercore` -c $(DRIVER_SRC)
g++ -Wall -Wextra -nostartfiles -shared -rdynamic -o libPumaMotorDriver.so PumaDriver.o PumaBody.o PumaMotor.o serialPort.o base_manipulation.o
install:
cp *.so /usr/local/lib
uninstall:
rm -f *.o *.so
rm /usr/local/lib/libPumaMotorDriver.so
clean:
rm -f *.o *.so
This makefile is not properly creating the .so file. How do I write a makefile that works with all my dependencies. The dependencies: The driver file is PumaDriver.cpp and it includes PumaDriver.h. PumaDriver.h also includes PumaBody.h. PumaBody.cpp includes PumaBody.h. PumaBody.h includes PumaMotor.h. PumaMotor.cpp includes PumaMotor.h. PumaMotor.h includes serialPort.h, base_manipulation.h, silvermax_commands.h. serialPort.cpp includes serialPort.h. base_manipulation.cpp includes base_manipulation.h.
Thanks for the help.
willydlw