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 rombuild.
|
|
15 |
|
|
16 |
|
|
17 |
ifdef EPOCROOT
|
|
18 |
include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
|
|
19 |
else
|
|
20 |
$(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
|
|
21 |
endif
|
|
22 |
|
|
23 |
cpp_inc_paths = \
|
|
24 |
-I ../../imglib/compress \
|
|
25 |
-I ../../imglib/inc \
|
|
26 |
-I ../../imglib/patchdataprocessor/include \
|
|
27 |
-I ../../imglib/parameterfileprocessor/include \
|
|
28 |
-I ../../imglib/memmap/include
|
|
29 |
|
|
30 |
lib_opts = -lboost_thread-mt \
|
|
31 |
-L../../imglib/memmap -lmemmap \
|
|
32 |
-L../../imglib/patchdataprocessor -lpatchdataprocessor \
|
|
33 |
-L../../imglib/parameterfileprocessor -lparameterfileprocessor \
|
|
34 |
|
|
35 |
exe = rombuild
|
|
36 |
|
|
37 |
CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags)
|
|
38 |
LDFLAGS = $(lib_opts) $(global_ld_flags)
|
|
39 |
|
|
40 |
prereqs = memmap patchdataprocessor parameterfileprocessor
|
|
41 |
|
|
42 |
srcs = r_dir.cpp r_header.cpp r_obey.cpp r_srec.cpp r_rom.cpp rombuild.cpp r_build.cpp r_collapse.cpp r_global.cpp r_areaset.cpp \
|
|
43 |
r_coreimage.cpp r_coreimagereader.cpp \
|
|
44 |
../../imglib/e32uid/e32uid.cpp \
|
|
45 |
../../imglib/host/h_file.cpp ../../imglib/host/h_mem.cpp ../../imglib/host/h_utl.cpp \
|
|
46 |
../../imglib/e32image/e32image.cpp \
|
|
47 |
../../imglib/e32image/deflate/decode.cpp ../../imglib/e32image/deflate/encode.cpp ../../imglib/e32image/deflate/deflate.cpp \
|
|
48 |
../../imglib/e32image/deflate/inflate.cpp ../../imglib/e32image/deflate/panic.cpp \
|
|
49 |
../../imglib/e32image/deflate/compress.cpp \
|
|
50 |
../../imglib/compress/byte_pair.cpp \
|
|
51 |
../../imglib/compress/pagedcompress.cpp
|
|
52 |
|
1
|
53 |
fixfiles = rombuild.cpp r_global.cpp r_global.h
|
|
54 |
fixbackups = $(addsuffix .original,$(fixfiles))
|
|
55 |
|
|
56 |
.PHONY: all clean $(prereqs) fixes remove_fixes
|
0
|
57 |
|
|
58 |
all: $(exe)
|
|
59 |
|
1
|
60 |
$(srcs): fixes
|
|
61 |
|
0
|
62 |
bases = $(basename $(srcs))
|
|
63 |
|
|
64 |
objs = $(addsuffix .o,$(bases))
|
|
65 |
|
|
66 |
$(prereqs): $(global_prereqs)
|
|
67 |
$(MAKE) -C $(EPOCROOT)/build $@
|
1
|
68 |
|
|
69 |
$(objs): $(prereqs)
|
0
|
70 |
|
1
|
71 |
$(exe): $(objs)
|
0
|
72 |
$(CC) -o $@ $(objs) $(LDFLAGS)
|
|
73 |
|
1
|
74 |
clean: remove_fixes
|
0
|
75 |
rm -f $(objs) $(exe)
|
|
76 |
|
1
|
77 |
fixes:: $(fixbackups)
|
|
78 |
|
|
79 |
rombuild.cpp.original:
|
|
80 |
cp $(basename $@) $@ && \
|
|
81 |
sed -e 's|^TInt gCPUNum = 0;||g' \
|
|
82 |
-e 's|TInt gThreadNum = 0;||g' \
|
|
83 |
-e 's|char\* g_pCharCPUNum = NULL;||g' \
|
|
84 |
-e 's|TBool gGenDepGraph = EFalse;||g' \
|
|
85 |
-e 's|char\* gDepInfoFile = NULL;||g' -i $(basename $@)
|
|
86 |
|
|
87 |
r_global.cpp.original:
|
|
88 |
cp $(basename $@) $@ && \
|
|
89 |
printf "TInt gCPUNum = 0;\nTInt gThreadNum = 0;\nchar* g_pCharCPUNum = NULL;\nTBool gGenDepGraph = EFalse;\nchar* gDepInfoFile = NULL;\n" >> $(basename $@)
|
|
90 |
|
|
91 |
r_global.h.original:
|
|
92 |
cp $(basename $@) $@ && \
|
|
93 |
sed '/^extern TInt gPageIndexTableSize/a\
|
|
94 |
extern TInt gCPUNum;\
|
|
95 |
extern TInt gThreadNum;\
|
|
96 |
extern char* g_pCharCPUNum;\
|
|
97 |
extern TBool gGenDepGraph;\
|
|
98 |
extern char* gDepInfoFile;' -i $(basename $@)
|
|
99 |
|
|
100 |
|
|
101 |
remove_fixes:
|
|
102 |
for file in $(fixbackups); do if [ -f $$file ]; then mv -f $$file $${file%\.original}; fi; done
|
|
103 |
|