source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vlutil/Makefile @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 2.5 KB
Line 
1# file:        Makefile
2# author:      Andrea Vedaldi
3# description: Build SIFT mex files
4
5DIST=vlutil
6VER=1.1.0
7BINDIST=$(DIST)-$(VER)-$(ARCH)
8
9# --------------------------------------------------------------------
10#
11# --------------------------------------------------------------------
12
13# Determine on the flight the system we are running on
14Darwin_ARCH := mac
15Linux_ARCH  := glx
16ARCH := $($(shell uname)_ARCH)
17
18#mac_CFLAGS       := -O -I.  -pedantic -Wall
19mac_CFLAGS       := -O -I. 
20mac_MEX_CFLAGS   := CFLAGS='$$CFLAGS $(mac_CFLAGS)'
21mac_MEX_SUFFIX   := mexmac
22
23# glx_CFLAGS       := -O -I. -pedantic -Wall
24glx_CFLAGS       := -O -I.
25glx_MEX_CFLAGS   := CFLAGS='$$CFLAGS $(glx_CFLAGS)'
26glx_MEX_SUFFIX   := mexglx
27
28MEX_SUFFIX   := $($(ARCH)_MEX_SUFFIX)
29MEX_CFLAGS   := $($(ARCH)_MEX_CFLAGS)
30
31# --------------------------------------------------------------------
32#
33# --------------------------------------------------------------------
34
35vpath %.mex.c   toolbox
36vpath %.mex.cpp toolbox
37
38src  := $(wildcard toolbox/*.mex.c) $(wildcard toolbox/*.mex.cpp)
39msrc := $(wildcard toolbox/*.m)
40stem := $(notdir $(basename $(basename $(src))))
41tgt  := $(addprefix mex/, $(addsuffix .$(MEX_SUFFIX),$(stem)))
42
43mex/%.$(MEX_SUFFIX) : %.mex.c
44        mex -I. $(MEX_CFLAGS) $< -outdir 'mex'
45        @mv mex/$*.mex.$(MEX_SUFFIX) mex/$*.$(MEX_SUFFIX)
46
47mex/%.$(MEX_SUFFIX) : %.mex.cpp
48        mex -I. $(MEX_CFLAGS) $< -outdir 'mex'
49        @mv mex/$*.mex.$(MEX_SUFFIX) mex/$*.$(MEX_SUFFIX)
50
51.PHONY: all
52all: $(tgt)
53
54.PHONY: info
55info :
56        @echo src  = $(src)
57        @echo stem = $(stem)
58        @echo tgt  = $(tgt)
59
60# PDF documentation
61.PHONY: doc
62doc: vlutil.html
63
64vlutil.html : $(msrc)
65        mdoc --output=vlutil.html --exclude 'test_*' toolbox
66
67.PHONY: clean
68clean:
69        rm -f $(tgt)
70        rm -f .DS_Store .gdb_history
71        find . -name '*~' -exec rm -f \{\} \;
72
73.PHONY: distclean
74distclean: clean
75        rm -f mex/*.mexmac mex/*.mexglx
76        rm -f vlutil.html
77        rm -rf $(DIST)-*
78
79.PHONY: dist
80dist: distclean
81        echo Version $(VER) >TIMESTAMP
82        echo Archive created on `date` >>TIMESTAMP
83        tar chzvf $(DIST)-$(VER).tar.gz ../$(notdir $(CURDIR))
84
85.PHONY: bindist
86bindist: all doc
87        test -e $(BINDIST) || mkdir $(BINDIST)
88        cp README toolbox/*.m vlutil.html mex/*.$(MEX_SUFFIX) $(BINDIST)
89        cd $(BINDIST) ; strip -S *.$(MEX_SUFFIX) $(notdir $(LIB))       
90        echo Version $(VER) >$(BINDIST)/TIMESTAMP
91        echo Package created on `date` >>$(BINDIST)/TIMESTAMP
92        tar cvzf $(BINDIST).tar.gz $(BINDIST)
93
94.PHONY: autorights
95autorights: distclean
96        autorights \
97          . \
98          --recursive \
99          --template gpl \
100          --years 2006 \
101          --authors "Andrea Vedaldi" \
102          --holders "Andrea Vedaldi" \
103          --program "VLUtil"
Note: See TracBrowser for help on using the repository browser.