source: level2/competencies/FacET/Makefile @ 234

Revision 74, 7.2 KB checked in by nik, 11 years ago (diff)

FacET import

Line 
1# $Id: Makefile 10 2009-03-24 21:45:48Z mw $
2#############################################################################
3# Makefile for building: FacET library and demo
4# Marek Wnuk, 10.03.2009
5#############################################################################
6
7#    FacET is a library for detecting and parameterising face components.
8#    Copyright (C) 2009  Marek Wnuk <marek.wnuk@pwr.wroc.pl>
9#
10#    This program is free software: you can redistribute it and/or modify
11#    it under the terms of the GNU General Public License as published by
12#    the Free Software Foundation, either version 3 of the License, or
13#    (at your option) any later version.
14#
15#    This program is distributed in the hope that it will be useful,
16#    but WITHOUT ANY WARRANTY; without even the implied warranty of
17#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18#    GNU General Public License for more details.
19#
20#    You should have received a copy of the GNU General Public License
21#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23
24####### Paths for compilation
25
26SRC=./src
27INC=./inc
28OBJ=./obj
29LIB=./lib
30DEMO=./demo
31
32####### Compiler, tools and options
33
34CC            = gcc
35CXX           = g++
36CFLAGS = `pkg-config --cflags opencv` -I${INC} -pipe -g -Wall -W -D_REENTRANT
37CXXFLAGS = `pkg-config --cflags opencv` -I${INC} -pipe -fpermissive -g -Wall -W -D_REENTRANT
38LDFLAGS =  `pkg-config --libs opencv` -lm -lavcodec -lavformat -lavutil -Wl,--no-undefined
39LINK          = g++
40AR            = ar cqs
41DEL_FILE      = rm -f
42
43####### Project data
44
45LIBNAME       = FacET
46
47LIBFILE       = lib${LIBNAME}.a
48
49LIBSOURCES    = ${SRC}/FastMatchTemplate.cpp \
50                ${SRC}/components.cpp \
51                ${SRC}/facet.cpp \
52                ${SRC}/face_regions.cpp \
53                ${SRC}/image_processing.cpp
54
55LIBOBJECTS    = ${OBJ}/FastMatchTemplate.o \
56                ${OBJ}/components.o \
57                ${OBJ}/facet.o \
58                ${OBJ}/face_regions.o \
59                ${OBJ}/image_processing.o
60
61OBJECTS       = ${LIBOBJECTS} ${DEMOOBJ}/*.o
62 
63DEMO          = demo
64
65DEMOOBJ       = ${DEMO}/obj
66DEMOSRC       = ${DEMO}/src
67DEMOINC       = ${DEMO}/inc
68
69LIBRARY       = ${LIB}/${LIBFILE}
70
71TARGET        = ${DEMO}/demo
72
73
74all : ${TARGET}
75
76library : ${LIBRARY}
77
78####### Build rules
79
80${LIBRARY} : ${LIBOBJECTS}
81        ar rvcs ${LIBRARY} ${LIBOBJECTS}
82
83
84${TARGET} :  ${DEMOOBJ}/main.o ${DEMOOBJ}/timer.o ${LIBRARY} ${DEMOOBJ}/cvcap_dc1394.o ${DEMOOBJ}/capture_mw.o
85        ${LINK} ${LDFLAGS} -o ${TARGET} ${DEMOOBJ}/main.o ${DEMOOBJ}/timer.o ${DEMOOBJ}/cvcap_dc1394.o ${DEMOOBJ}/capture_mw.o ${LIBS} -L${LIB} -l${LIBNAME}
86
87
88clean:
89        -${DEL_FILE} ${OBJECTS}
90        -${DEL_FILE} *~ core *.core
91
92help:
93        @echo
94        @echo " help     - shows this help"
95        @echo " clean    - removes all products of compilation"
96        @echo " library  - builds FacET library (lib/libFacET.a)"
97        @echo " docs     - builds doxygen documentation"
98        @echo " all      - builds demo program for FacET library"
99        @echo
100
101docs:
102        doxygen doc/Doxyfile
103        (cd doc/latex; make)
104
105
106####### Compile library files
107
108${OBJ}/FastMatchTemplate.o: ${SRC}/FastMatchTemplate.cpp \
109                /opt/opencv/include/opencv/cv.h \
110                /opt/opencv/include/opencv/cxcore.h \
111                /opt/opencv/include/opencv/cxtypes.h \
112                /opt/opencv/include/opencv/cxerror.h \
113                /opt/opencv/include/opencv/cvver.h \
114                /opt/opencv/include/opencv/cxcore.hpp \
115                /opt/opencv/include/opencv/cvtypes.h \
116                /opt/opencv/include/opencv/cv.hpp \
117                /opt/opencv/include/opencv/cvcompat.h \
118                ${INC}/FastMatchTemplate.h \
119                ${INC}/facet.h
120        ${CXX} -c ${CXXFLAGS} -o ${OBJ}/FastMatchTemplate.o ${SRC}/FastMatchTemplate.cpp
121
122${OBJ}/components.o: ${SRC}/components.cpp \
123                /opt/opencv/include/opencv/cv.h \
124                /opt/opencv/include/opencv/cxcore.h \
125                /opt/opencv/include/opencv/cxtypes.h \
126                /opt/opencv/include/opencv/cxerror.h \
127                /opt/opencv/include/opencv/cvver.h \
128                /opt/opencv/include/opencv/cxcore.hpp \
129                /opt/opencv/include/opencv/cvtypes.h \
130                /opt/opencv/include/opencv/cv.hpp \
131                /opt/opencv/include/opencv/cvcompat.h \
132                ${INC}/facet.h
133        ${CXX} -c ${CXXFLAGS} -o ${OBJ}/components.o ${SRC}/components.cpp
134
135${OBJ}/facet.o: ${SRC}/facet.cpp \
136                /opt/opencv/include/opencv/cv.h \
137                /opt/opencv/include/opencv/cxcore.h \
138                /opt/opencv/include/opencv/cxtypes.h \
139                /opt/opencv/include/opencv/cxerror.h \
140                /opt/opencv/include/opencv/cvver.h \
141                /opt/opencv/include/opencv/cxcore.hpp \
142                /opt/opencv/include/opencv/cvtypes.h \
143                /opt/opencv/include/opencv/cv.hpp \
144                /opt/opencv/include/opencv/cvcompat.h \
145                /opt/opencv/include/opencv/cvaux.h \
146                /opt/opencv/include/opencv/cvaux.hpp \
147                /opt/opencv/include/opencv/cvvidsurv.hpp \
148                /opt/opencv/include/opencv/highgui.h \
149                ${INC}/FastMatchTemplate.h \
150                ${INC}/facet.h
151        ${CXX} -c ${CXXFLAGS} -o ${OBJ}/facet.o ${SRC}/facet.cpp
152
153${OBJ}/face_regions.o: ${SRC}/face_regions.cpp \
154                /opt/opencv/include/opencv/cv.h \
155                /opt/opencv/include/opencv/cxcore.h \
156                /opt/opencv/include/opencv/cxtypes.h \
157                /opt/opencv/include/opencv/cxerror.h \
158                /opt/opencv/include/opencv/cvver.h \
159                /opt/opencv/include/opencv/cxcore.hpp \
160                /opt/opencv/include/opencv/cvtypes.h \
161                /opt/opencv/include/opencv/cv.hpp \
162                /opt/opencv/include/opencv/cvcompat.h \
163                /opt/opencv/include/opencv/highgui.h \
164                ${INC}/facet.h \
165                ${INC}/FastMatchTemplate.h
166        ${CXX} -c ${CXXFLAGS} -o ${OBJ}/face_regions.o ${SRC}/face_regions.cpp
167
168${OBJ}/image_processing.o: ${SRC}/image_processing.cpp \
169                /opt/opencv/include/opencv/cv.h \
170                /opt/opencv/include/opencv/cxcore.h \
171                /opt/opencv/include/opencv/cxtypes.h \
172                /opt/opencv/include/opencv/cxerror.h \
173                /opt/opencv/include/opencv/cvver.h \
174                /opt/opencv/include/opencv/cxcore.hpp \
175                /opt/opencv/include/opencv/cvtypes.h \
176                /opt/opencv/include/opencv/cv.hpp \
177                /opt/opencv/include/opencv/cvcompat.h \
178                /opt/opencv/include/opencv/cvaux.h \
179                /opt/opencv/include/opencv/cvaux.hpp \
180                /opt/opencv/include/opencv/cvvidsurv.hpp \
181                /opt/opencv/include/opencv/highgui.h \
182                ${INC}/facet.h \
183                ${INC}/FastMatchTemplate.h
184        ${CXX} -c ${CXXFLAGS} -o ${OBJ}/image_processing.o ${SRC}/image_processing.cpp
185
186####### Compile demo files
187
188${DEMOOBJ}/main.o: ${DEMOSRC}/main.cpp \
189                /opt/opencv/include/opencv/cv.h \
190                /opt/opencv/include/opencv/cxcore.h \
191                /opt/opencv/include/opencv/cxtypes.h \
192                /opt/opencv/include/opencv/cxerror.h \
193                /opt/opencv/include/opencv/cvver.h \
194                /opt/opencv/include/opencv/cxcore.hpp \
195                /opt/opencv/include/opencv/cvtypes.h \
196                /opt/opencv/include/opencv/cv.hpp \
197                /opt/opencv/include/opencv/cvcompat.h \
198                /opt/opencv/include/opencv/highgui.h \
199                /opt/opencv/include/opencv/cvaux.h \
200                /opt/opencv/include/opencv/cvaux.hpp \
201                /opt/opencv/include/opencv/cvvidsurv.hpp \
202                ${INC}/facet.h \
203                ${INC}/FastMatchTemplate.h \
204                ${DEMOINC}/timer.h \
205                ${DEMOINC}/captparam.h \
206                ${DEMOINC}/options.h
207        ${CXX} -c ${CXXFLAGS} -I${DEMOINC} -o ${DEMOOBJ}/main.o ${DEMOSRC}/main.cpp
208
209${DEMOOBJ}/timer.o: ${DEMOSRC}/timer.cpp ${DEMOINC}/timer.h
210        ${CXX} -c ${CXXFLAGS} -I${DEMOINC} -o ${DEMOOBJ}/timer.o ${DEMOSRC}/timer.cpp
211
212${DEMOOBJ}/cvcap_dc1394.o: ${DEMOSRC}/cvcap_dc1394.cpp ${DEMOINC}/cvconfig.h ${DEMOINC}/_highgui.h
213        ${CXX} -c ${CXXFLAGS} -I${DEMOINC} -o ${DEMOOBJ}/cvcap_dc1394.o ${DEMOSRC}/cvcap_dc1394.cpp
214
215${DEMOOBJ}/capture_mw.o: ${DEMOSRC}/capture_mw.cpp ${DEMOINC}/capture_mw.h
216        ${CXX} -c ${CXXFLAGS} -I${DEMOINC} -o ${DEMOOBJ}/capture_mw.o ${DEMOSRC}/capture_mw.cpp
217
218#######
219
Note: See TracBrowser for help on using the repository browser.