0
|
1 |
# Copyright (c) 2009 Symbian Foundation Ltd
|
|
2 |
# This component and the accompanying materials are made available
|
|
3 |
# under the terms of the License "Eclipse Public License v1.0"
|
|
4 |
# which accompanies this distribution, and is available
|
|
5 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
6 |
#
|
|
7 |
# Initial Contributors:
|
|
8 |
# Symbian Foundation Ltd - initial contribution.
|
|
9 |
# Mike Kinghan, mikek@symbian.org
|
|
10 |
#
|
|
11 |
# Contributors:
|
|
12 |
#
|
|
13 |
# Description:
|
|
14 |
# This is a Linux makefile for the imgcheck .
|
|
15 |
|
|
16 |
ifdef EPOCROOT
|
|
17 |
include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
|
|
18 |
else
|
|
19 |
$(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
|
|
20 |
endif
|
|
21 |
|
|
22 |
prereqs = patchdataprocessor libimgutils
|
|
23 |
|
|
24 |
.PHONY: all clean fixes remove_fixes $(prereqs)
|
|
25 |
|
|
26 |
cpp_inc_paths = -I . -I .libxml -I ../imglib/inc -I ../romtools/rofsbuild \
|
|
27 |
-I libimgutils/inc -I inc -I ../imglib/compress
|
|
28 |
|
|
29 |
lib_opts = -lxml2 -L libimgutils -limgutils -L ../imglib/patchdataprocessor -lpatchdataprocessor
|
|
30 |
|
|
31 |
exe = imgcheck
|
|
32 |
|
|
33 |
CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags)
|
|
34 |
CXXFLAGS = $(global_cxx_flags) -pthread
|
|
35 |
LDFLAGS = $(global_ld_flags) $(lib_opts)
|
|
36 |
|
|
37 |
srcs = src/cmdlinehandler.cpp src/depchecker.cpp src/hash.cpp src/main.cpp \
|
|
38 |
src/imgcheckmanager.cpp src/sidchecker.cpp src/vidchecker.cpp src/common.cpp src/checker.cpp src/reporter.cpp \
|
|
39 |
src/exceptionimplementation.cpp src/exceptionreporter.cpp \
|
|
40 |
src/cmdlinewriter.cpp src/xmlwriter.cpp src/dbgflagchecker.cpp
|
|
41 |
|
|
42 |
bases = $(basename $(srcs))
|
|
43 |
|
|
44 |
objs = $(addsuffix .o,$(bases))
|
|
45 |
|
|
46 |
fixfiles = inc/exceptionimplementation.h inc/xmlwriter.h src/exceptionimplementation.cpp src/xmlwriter.cpp
|
|
47 |
fixbackups = $(addsuffix .original,$(fixfiles))
|
|
48 |
|
|
49 |
all: $(exe)
|
|
50 |
|
|
51 |
$(srcs): fixes
|
|
52 |
|
|
53 |
$(prereqs): $(global_prereqs)
|
|
54 |
$(MAKE) -C $(EPOCROOT)/build $@
|
|
55 |
|
1
|
56 |
$(objs): $(prereqs)
|
|
57 |
|
|
58 |
$(exe): $(objs)
|
0
|
59 |
$(CC) -o $@ $(objs) $(LDFLAGS)
|
|
60 |
|
|
61 |
clean: remove_fixes
|
|
62 |
rm -f $(objs) $(exe)
|
|
63 |
for file in $(subdirs); do $(MAKE) -C $$file clean; done
|
|
64 |
|
1
|
65 |
fixes:: $(fixbackups)
|
0
|
66 |
|
|
67 |
inc/exceptionimplementation.h.original:
|
|
68 |
cp $(basename $@) $@ && \
|
|
69 |
sed -e 's|ofstream iLogStream;|Ofstream iLogStream;|g' -i $(basename $@)
|
|
70 |
|
|
71 |
inc/xmlwriter.h.original:
|
|
72 |
cp $(basename $@) $@ && \
|
|
73 |
sed -e 's|ofstream iXmlFile;|Ofstream iXmlFile;|g' -i $(basename $@)
|
|
74 |
|
|
75 |
src/exceptionimplementation.cpp.original:
|
|
76 |
cp $(basename $@) $@ && \
|
|
77 |
sed '/#include "exceptionimplementation.h"/ a\
|
|
78 |
using namespace std;' -i $(basename $@)
|
|
79 |
|
|
80 |
src/xmlwriter.cpp.original:
|
|
81 |
cp $(basename $@) $@ && \
|
|
82 |
sed -e 's|ifstream xslSourceHandle;|Ifstream xslSourceHandle;|g' \
|
|
83 |
-e 's|ofstream xslDestHandle|Ofstream xslDestHandle|g' -i $(basename $@)
|
|
84 |
|
|
85 |
remove_fixes:
|
1
|
86 |
for file in $(fixbackups); do if [ -f $$file ]; then mv -f $$file $${file%\.original}; fi; done
|
0
|
87 |
|