That is correct, libbox2d was always installed on my system so I overlooked this issue.
Good fix! Thank you for pointing this out!
Also notice that there is no install target yet.
Edit: I am suggesting the following (hopefully temporary) install target for gnu make:
Code:
PREFIX?=/usr/local
INSTALL_HEADERS=find Box2D -path .svn -prune -o -name *.h
INSTALL_LIBRARIES=Box2D/build/libbox2d.a Box2D/build/libbox2d.so
... other targets ...
install:
@for file in $$(${INSTALL_HEADERS}); do\
echo "Installing: $$file";\
echo " to: $(PREFIX)/include/$$file";\
mkdir -p $$(dirname $(PREFIX)/include/$$file);\
test $$? -ne 0 && exit $$?;\
install $$file $(PREFIX)/include/$$file;\
test $$? -ne 0 && exit $$?;\
done
@for file in ${INSTALL_LIBRARIES}; do\
echo "Installing: $$file";\
echo " to: $(PREFIX)/lib/$$(basename $$file)";\
install $$file $(PREFIX)/lib/$$(basename $$file);\
test $$? -ne 0 && exit $$?;\
done
This will by default allow people to install the library in /usr/local by default, or specified target prefix by running:
Code:
PREFIX=/usr make install
And this is where the wrinkles of 'make' starts to shine through, there is no easy way to make sure that one of the target has been built, therefore the developer or packager has to make certain that the libraries listed in INSTALL_LIBRARIES exist.
By using mkdir and 'install' it will produce very sensible errors. mkdir will early trigger permission errors (which is also true for install), and install will explain that the source file does not exist.