|
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 getexports. |
|
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 cpp_inc_paths = -I ../inc -I $(EPOCROOT)/epoc32/include/tools |
|
23 |
|
24 lib_opts = |
|
25 |
|
26 exe = getexports |
|
27 |
|
28 CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags) -Dstricmp=_stricmp |
|
29 LDFLAGS = $(lib_opts) $(global_ld_flags) |
|
30 |
|
31 prereqs = |
|
32 |
|
33 srcs = geninf.cpp |
|
34 |
|
35 fixfiles = geninf.cpp |
|
36 fixbackups = $(addsuffix .original,$(fixfiles)) |
|
37 |
|
38 |
|
39 .PHONY: all clean $(prereqs) |
|
40 |
|
41 all: $(exe) |
|
42 |
|
43 $(srcs): fixes |
|
44 |
|
45 bases = $(basename $(srcs)) |
|
46 |
|
47 objs = $(addsuffix .o,$(bases)) |
|
48 |
|
49 $(prereqs): $(global_prereqs) |
|
50 $(MAKE) -C $(EPOCROOT)/build $@ |
|
51 |
|
52 $(exe): $(objs) $(prereqs) |
|
53 $(CC) -o $@ $(objs) $(LDFLAGS) |
|
54 |
|
55 clean: remove_fixes |
|
56 rm -f $(objs) $(exe) |
|
57 |
|
58 fixes: $(fixbackups) |
|
59 |
|
60 remove_fixes: |
|
61 for file in $(fixbackups); do if [ -f $$file ]; then mv -f $$file $${file%original}; fi; done |
|
62 |
|
63 geninf.cpp.original: |
|
64 cp $(basename $@) $@ && \ |
|
65 sed -e 's|stricmp|strcmp|g' -i $(basename $@) |
|
66 |