makefiles-garage/imgtools/sisutils/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 sisutils library. 
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    15
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    16
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    17
ifdef EPOCROOT
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    18
include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    19
else
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    20
$(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    21
endif
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    22
1
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    23
#todo_target = seclib
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    24
#include $(EPOCROOT)/build/makefiles-garage/todo.mk
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    25
#all: todo
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    26
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    27
cpp_inc_paths = -I inc
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    28
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    29
lib = libsisutils.a
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    30
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    31
CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags) 
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    32
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    33
srcs = \
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    34
src/sisutils.cpp \
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    35
src/sis2iby.cpp \
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    36
src/pkglanguage.cpp \
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    37
src/pkgfileparser.cpp
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    38
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    39
fixfiles = src/sisutils.cpp src/sis2iby.cpp src/pkgfileparser.cpp inc/pkgfileparser.h inc/sisutils.h
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    40
fixbackups = $(addsuffix .original,$(fixfiles))
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    41
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    42
all: $(lib)
0
37428ad74fc2 Initial commit.
Mike Kinghan <mikek@symbian.org>
parents:
diff changeset
    43
1
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    44
.PHONY: all clean fixes remove_fixes
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    45
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    46
$(srcs): fixes
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    47
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    48
bases = $(basename $(srcs))
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    49
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    50
objs = $(addsuffix .o,$(bases))
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    51
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    52
$(lib): $(objs)
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    53
	ar r $@ $(objs)
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    54
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    55
clean: remove_fixes
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    56
	rm -f $(objs) $(lib)
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    57
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    58
fixes:: $(fixbackups)
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    59
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    60
$(fixbackups):
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    61
	cp $(basename $@) $@ && \
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    62
	cp -f $(EPOCROOT)/build/clobber/imgtools/sisutils/$(basename $@) $(EPOCROOT)/build/imgtools/sisutils/$(basename $@) 
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    63
	
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    64
remove_fixes: 
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    65
	for file in $(fixbackups); do if [ -f $$file ]; then mv -f $$file $${file%\.original}; fi; done
820b22e13ff1 Commit further implemented Linux makefiles
mikek
parents: 0
diff changeset
    66