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

Add install/uninstall functions to Makefile #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ to run the bundler pipeline, you will also need to create a
RunBundler.sh config file with the line USE_CERES=true (see
RunBundler.sh for more details).

Run "make install" to install bundler_sfm executable, along with its shared library and helper scripts.

Run "make uninstall" to uninstall bundler_sfm.


For Windows systems, see the vc++ directory for a Visual Studio 2005
solution file (vc++/Bundler.sln).

Expand Down
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
ANN_TARGET = linux-g++-shared

OS = $(shell uname -o)
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib

ifeq ($(OS), Cygwin)
ANN_TARGET = win32-g++-shared
endif
Expand All @@ -31,7 +35,42 @@ default:
# Main program
cd src; $(MAKE)

install:
cd bin;
mkdir -p $(BINDIR)
mkdir -p $(LIBDIR)

# Install shared library
install -Dm644 bin/libANN_char.so $(LIBDIR)/libANN_char.so

# Install binaries
install -Dm755 bin/Bundle2Ply $(BINDIR)/Bundle2Ply
install -Dm755 bin/Bundle2PMVS $(BINDIR)/Bundle2PMVS
install -Dm755 bin/Bundle2Vis $(BINDIR)/Bundle2Vis
install -Dm755 bin/bundler $(BINDIR)/bundler_sfm
install -Dm755 bin/extract_focal.pl $(BINDIR)/extract_focal.pl
install -Dm755 bin/FisheyeUndistort $(BINDIR)/FisheyeUndistort
install -Dm755 bin/KeyMatchFull $(BINDIR)/KeyMatchFull
install -Dm755 bin/RadialUndistort $(BINDIR)/RadialUndistort
install -Dm755 bin/ToSift.sh $(BINDIR)/ToSift.sh
install -Dm755 bin/ToSiftList.sh $(BINDIR)/ToSiftList.sh

uninstall:
# Uninstall shared library
rm $(LIBDIR)/libANN_char.so

# Uninstall binaries
rm $(BINDIR)/Bundle2Ply
rm $(BINDIR)/Bundle2PMVS
rm $(BINDIR)/Bundle2Vis
rm $(BINDIR)/bundler_sfm
rm $(BINDIR)/extract_focal.pl
rm $(BINDIR)/FisheyeUndistort
rm $(BINDIR)/KeyMatchFull
rm $(BINDIR)/RadialUndistort
rm $(BINDIR)/ToSift.sh
rm $(BINDIR)/ToSiftList.sh

clean:
cd lib/5point; $(MAKE) clean
cd lib/ann_1.1_char; $(MAKE) clean
Expand Down