forked from svn2github/exiv2_
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
172 lines (147 loc) · 5.91 KB
/
Makefile
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# ***************************************************** -*- Makefile -*-
#
# Copyright (C) 2004-2015 Andreas Huggel <[email protected]>
#
# This Makefile is part of the Exiv2 distribution.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# File: Makefile.in
# Version: $Rev$
# Author(s): Andreas Huggel (ahu) <[email protected]>
# History: 15-Jan-04, ahu: created
#
# Description:
# Simple top-level makefile that mainly forwards to makefiles in
# subdirectories.
#
# Restrictions:
# Requires GNU make.
#
########################################################################
# Makefile is a generated file. Do NOT change any settings in this file.
# Run ./configure with the appropriate options to regenerate the file
# and possibly others.
########################################################################
SHELL = /bin/sh
ENABLE_XMP = 1
.PHONY: all doc config samples xmpsdk \
mostlyclean clean distclean maintainer-clean \
install uninstall tests teste testv
all install: config/config.mk xmpsdk
cd src && $(MAKE) $(MAKECMDGOALS)
cd po && $(MAKE) $(MAKECMDGOALS)
uninstall: config/config.mk
cd src && $(MAKE) $(MAKECMDGOALS)
cd po && $(MAKE) $(MAKECMDGOALS)
doc: config/config.mk
cd doc && $(MAKE) $(MAKECMDGOALS)
# exiv2 application and programs required by test suite
exiv2:
cd src && $(MAKE) $0
# sample programs required by test suite
conntest exifprint remotetest:
cd samples && $(MAKE) $@
samples: config/config.mk
cd samples && $(MAKE) $(MAKECMDGOALS)
# test suite
tests:
cd test && $(MAKE) test
# test suite sub groups
teste testx testv:
cd test && $(MAKE) $@
# convenience for running individual tests
bugfixes-test.sh crw-test.sh curliotest.sh eps-preview-test.sh eps-test.sh exifdata-test.sh \
exiv2-test.sh httpiotest.sh imagetest.sh iotest.sh iptctest.sh modify-test.sh \
path-test.sh preview-test.sh sshiotest.sh stringto-test.sh tiff-test.sh video-test.sh \
write-test.sh write-video-test.sh write2-test.sh xmpparser-test.sh :
cd test && ./$@
# convenience target for running bugfixes-test.sh
bugtest bugstest testbugs bugfixes:
cd test && ./bugfixes-test.sh
# convenience target for building individual sample programs
addmoddel exifcomment exifvalue httptest iptctest mmap-test stringto-test \
exifdata iotest key-test path-test taglist write2-test write-test \
convert-test exifdata-test exiv2json iptceasy largeiptc-test prevtest tiff-test \
easyaccess-test geotag iptcprint metacopy werror-test xmpparser-test xmpsample xmpparse :
cd samples && $(MAKE) $(MAKECMDGOALS)
MAJOR=$(shell grep "define.*EXIV2_.*_VERSION .*\\d*" src/version.hpp | grep MAJOR | sed -e 's/EXIV2//g' | tr -dC [:digit:])
MINOR=$(shell grep "define.*EXIV2_.*_VERSION .*\\d*" src/version.hpp | grep MINOR | sed -e 's/EXIV2//g' | tr -dC [:digit:])
VERSION=exiv2-$(MAJOR).$(MINOR)
tarball:
@rm -rf /tmp/$(VERSION)
@rm -rf /tmp/$(VERSION).tar
@rm -rf /tmp/$(VERSION).tar.gz
@rm -rf $(VERSION).tar.gz
svn export -q . /tmp/$(VERSION)
@cd /tmp/$(VERSION) ;\
make config ;\
cd - ; cd /tmp ;\
tar cf $(VERSION).tar $(VERSION)/ ;\
gzip $(VERSION).tar ;\
cd - ;\
mv /tmp/$(VERSION).tar.gz . ;\
ls -alt $(VERSION).tar.gz
configure:
make config
config:
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
xmpsdk: src/svn_version.h config/config.mk
if test "x$(ENABLE_XMP)" = "x1"; then cd xmpsdk/src && $(MAKE) $@; fi;
src/svn_version.h:
cd src && $(MAKE) svn_version.h
mostlyclean clean: config/config.mk
cd src && $(MAKE) $(MAKECMDGOALS)
cd doc && $(MAKE) $(MAKECMDGOALS)
cd samples && $(MAKE) $(MAKECMDGOALS)
cd test && $(MAKE) $(MAKECMDGOALS)
cd xmpsdk/src && $(MAKE) $(MAKECMDGOALS)
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
cd po && $(MAKE) $(MAKECMDGOALS)
rm -f include/exiv2/exv_conf.h src/svn_version.h
# `make distclean' also removes files created by configuring
# the program. Running `make all distclean' prepares the project
# for packaging.
distclean: clean
rm -f config.log config.status libtool
rm -f *~ *.bak
if [ -e bin ]; then rm -rf bin ; fi
# This removes almost everything, including the configure script!
maintainer-clean: distclean
rm -f configure
-cd test && $(MAKE) $(MAKECMDGOALS)
config/config.mk:
$(error File config/config.mk does not exist. Did you run ./configure?)
rebuild:
make distclean
make config
./configure
make -j
sudo make install
make -j samples
# That's all Folks!
##