Imported Upstream version 58.1
[platform/upstream/icu.git] / source / config / mh-haiku
1 ## -*-makefile-*-
2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## haiku-specific setup
5 ## Copyright (c) 2010-2012, International Business Machines Corporation and
6 ## others. All Rights Reserved.
7 ##
8
9 ## Commands to generate dependency files
10 GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
11 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
12
13 ## Flags for position independent code
14 SHAREDLIBCFLAGS = -fPIC
15 SHAREDLIBCXXFLAGS = -fPIC
16 SHAREDLIBCPPFLAGS = -DPIC
17
18 ## Additional flags when building libraries and with threads
19 LIBCPPFLAGS =
20 THREADSCPPFLAGS =
21
22 #
23 CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1
24
25 ## Compiler switch to embed a runtime search path
26 LD_RPATH=
27 LD_RPATH_PRE = -Wl,-rpath,
28
29 ## Compiler switch to embed a library name
30 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
31
32 ## Shared object suffix
33 SO = so
34 ## Non-shared intermediate object suffix
35 STATIC_O = ao
36
37 ## Compilation rules
38 %.$(STATIC_O): $(srcdir)/%.c
39         $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
40 %.o: $(srcdir)/%.c
41         $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
42
43 %.$(STATIC_O): $(srcdir)/%.cpp
44         $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
45 %.o: $(srcdir)/%.cpp
46         $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
47
48
49 ## Dependency rules
50 %.d: $(srcdir)/%.c
51         @echo "generating dependency information for $<"
52         @$(SHELL) -ec '$(GEN_DEPS.c) $< \
53                 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
54                 [ -s $@ ] || rm -f $@'
55
56 %.d: $(srcdir)/%.cpp
57         @echo "generating dependency information for $<"
58         @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
59                 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
60                 [ -s $@ ] || rm -f $@'
61
62 ## Versioned libraries rules
63
64 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
65         $(RM) $@ && ln -s ${<F} $@
66 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
67         $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
68
69 ##  Bind internal references
70
71 # LDflags that pkgdata will use
72 BIR_LDFLAGS= -Wl,-Bsymbolic
73
74 # Dependencies [i.e. map files] for the final library
75 BIR_DEPS=
76
77 # Use LIBRARY_PATH instead of LD_LIBRARY_PATH
78 LDLIBRARYPATH_ENVVAR= LIBRARY_PATH
79
80 ## End haiku-specific setup