[1fc021]: Makefile  Maximize  Restore  History

Download this file

115 lines (82 with data), 2.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# install prefix
ifndef PREFIX
PREFIX=/usr
endif
# compiler settings
# By default, pano13 is required. To build against pano12, remove
# the -DHAS_PANO13 and change the LDLIBS to link against -lpano12
CC=gcc
ifndef CFLAGS
CFLAGS=-Wall -O2
endif
CFLAGS+= -I/usr/include/libxml2 -DHAS_PANO13
LDFLAGS= -L.
LDLIBS= -lsift -lpano13 -lxml2 -lm
LIBSIFT_SOURCES=LoweDetector.c RANSAC.c GaussianConvolution.c ScaleSpace.c \
KeypointXML.c MatchKeys.c KDTree.c BondBall.c AreaFilter.c \
ImageMatchModel.c Transform.c DisplayImage.c ImageMap.c \
HashTable.c ArrayList.c Random.c SimpleMatrix.c \
Utils.c
GENERATEKEYS_SOURCES=GenerateKeys.c
AUTOPANO_SOURCES=AutoPano.c
TEST_SOURCES=TestRandom.c TestArray.c TestKDTree.c
SOURCES=$(LIBSIFT_SOURCES) $(GENERATEKEY_SOURCES) $(AUTOPANO_SOURCES) $(TEST_SOURCES)
LIBSIFT_OBJECTS=$(patsubst %.c,%.o,$(LIBSIFT_SOURCES))
GENERATEKEYS_OBJECTS=$(patsubst %.c,%.o,$(GENERATEKEYS_SOURCES))
AUTOPANO_OBJECTS=$(patsubst %.c,%.o,$(AUTOPANO_SOURCES))
TEST_OBJECTS=$(patsubst %.c,%.o,$(TEST_SOURCES))
OBJECTS=$(LIBSIFT_OBJECTS) $(GENERATEKEYS_OBJECTS) $(AUTOPANO_OBJECTS) $(TEST_OBJECTS)
LIBSIFT=libsift.a
VERSION=2.4
NAME=autopano-sift-C
#CC=ccmalloc gcc
#LINK.o=ccmalloc g++ $(LDFLAGS)
TOOLS=generatekeys autopano
TESTS=TestRandom TestArray TestSimpleMatrix TestTransform \
TestRansac TestAreaFilter TestKDTree
BINARIES=libsift.a $(TOOLS) $(TESTS)
all: $(LIBSIFT) $(TOOLS)
tests: $(TESTS)
install: $(TOOLS)
install -d $(PREFIX)/bin
install -d $(PREFIX)/share/man/man1
install -d $(PREFIX)/share/man/man7
install -m 0755 generatekeys $(PREFIX)/bin
install -m 0755 autopano $(PREFIX)/bin
install -m 0755 autopano-c-complete.sh $(PREFIX)/bin
install -m 0644 doc/*.1 $(PREFIX)/share/man/man1
install -m 0644 doc/*.7 $(PREFIX)/share/man/man7
$(TEST_OBJECTS) $(TOOLS): $(LIBSIFT)
$(OBJECTS): AutoPanoSift.h
TestArray.o: TestArray.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestRandom.o: TestRandom.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestSimpleMatrix.o: SimpleMatrix.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestTransform.o: Transform.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestRansac.o: RANSAC.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestAreaFilter.o: AreaFilter.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
TestKDTree.o: TestKDTree.c
$(CC) $(CFLAGS) -DTEST_MAIN -c $< -o $@
libsift.a: $(LIBSIFT_OBJECTS)
ar cru $@ $^
ranlib $@
generatekeys: $(GENERATEKEYS_OBJECTS)
$(LINK.o) $^ $(LDLIBS) -o $@
autopano: $(AUTOPANO_OBJECTS)
$(LINK.o) $^ $(LDLIBS) -o $@
dep:
makedepend $(CFLAGS) $(SOURCES)
dist:
mkdir $(NAME)-$(VERSION)
mkdir $(NAME)-$(VERSION)/doc
cp -a {Makefile,*.h,*.c,README*,LICENSE,*.sh} $(NAME)-$(VERSION)
cp -a doc/*.{1,7,txt} $(NAME)-$(VERSION)/doc
tar zcvf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
clean:
rm -f $(OBJECTS) $(BINARIES) core *~

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks