Debian Codegraph @

Makefile

raw ◀ ▶
3 Debian patches touch this file
1 # -----------------------------------------------------------------------------
2 # MetaCam - Extract EXIF information from digital camera files, with
3 # support for Vendor specific blocks.
4 # Copyright (C) 2000 Daniel Stephens ([email protected])
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # -----------------------------------------------------------------------------
20 #
21 # $Id: Makefile,v 1.12 2002/09/02 20:28:46 daniel Exp $
22
23 # Some operating-system dependent choices for compile-time flags. Uncomment
24 # whichever is most appropriate
25 # -- g++ on linux
26 OSCXXFLAGS=-ansi -pedantic
27 # -- Cygwin under Windows 2000
28 #OSCXXFLAGS=
29
30 CXX=g++
31 INCLUDES=
32
•33 CXXFLAGS?=-O2
34 CXXFLAGS+=-Wall $(OSCXXFLAGS) -D_GNU_SOURCE $(INCLUDES)
35
36 LIBOBJS=rationals.o exiftags.o \
37 nikontags.o olympustags.o canontags.o casiotags.o dpyfuncs.o \
38 metatiff.o filetiff.o tiffdata.o dataifd.o dataifdentry.o editifd.o \
39 ocontext.o lookups.o
40 EXEOBJS=metacam.o
41 HDRS=metacam.h dpyfuncs.h metatiff.h filetiff.h datatiff.h edittiff.h \
42 odrivers.h
43
44 DEPS=$(LIBOBJS:.o=.dep) $(EXEOBJS:.o=.dep)
45
46 ##### TARGETS ######
47
48 default: metacam
49
50 clean:
51 -rm -f *.o *~ *-
52
53 tags:
54 etags *.cc *.h
55
56 realclean:
57 -rm -f metacam
58 -rm -f *.o *~ *-
59 -rm -f *.dep
60 -rm -f dependencies
61 -rm -f TAGS
62
63 libmetacam.a: $(LIBOBJS)
64 rm -f libmetacam.a
65 ar rsc libmetacam.a- $(LIBOBJS)
66 mv -f libmetacam.a- libmetacam.a
67
68 metacam: $(EXEOBJS) libmetacam.a
•69 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(EXEOBJS) -o metacam -lm -L. -lmetacam
70
71 # Dependency rules
72 dependencies: Makefile $(DEPS)
73 cat $(DEPS) > dependencies-
74 mv -f dependencies- dependencies
75
76 # Each .dep file will hold dependencies for both the .o file, and an identical
77 # list to determine when the .dep file needs rebuilding. Clever eh?
78 %.dep: %.cc $(HDRS)
•79 $(CXX) $(CFLAGS) $(CPPFLAGS) $(INCS) -M -E -c $*.cc > $*.dep-
80 sed -e 's/[.]o:/.dep:/' $*.dep- > $*.dep--
81 cat $*.dep-- >> $*.dep-
82 rm -f $*.dep--
83 mv -f $*.dep- $*.dep
84
85 tar:
86 -rm -f files.tar
87 tar -cvf files.tar $(LIBOBJS:.o=.cc) $(EXEOBJS:.o=.cc) $(HDRS) Makefile THANKS $(wildcard README.*) LICENSE.TXT BUGS
88
89 include dependencies
90