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