1b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## -*-makefile-*-
264339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert## Copyright (C) 2016 and later: Unicode, Inc. and others.
364339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert## License & terms of use: http://www.unicode.org/copyright.html
4b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Linux-specific setup for Visual Age
527f654740f2a26ad62a5c155af9199af9e69b889claireho## Copyright (c) 2003-2010, International Business Machines Corporation and
6b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## others. All Rights Reserved.
7b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
8b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Commands to generate dependency files
9b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruGEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruGEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
11b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
12b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru# -qroconst make the strings readonly, which is usually the default.
13b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#           This helps in the data library,
14b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru# -qproto assumes all functions are prototyped (for optimization)
15b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruCFLAGS += -qproto -qroconst
16b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruCXXFLAGS += -qproto -qroconst
17b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
18b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruGENCCODE_ASSEMBLY=-a gcc
19b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Flags for position independent code
20b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSHAREDLIBCFLAGS = -qpic=large
21b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSHAREDLIBCXXFLAGS = -qpic=large
22b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSHAREDLIBCPPFLAGS = -DPIC
23b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
24b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Additional flags when building libraries and with threads
25b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruTHREADSCPPFLAGS = -D_REENTRANT
26b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruLIBCPPFLAGS =
27b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
28b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Compiler switch to embed a runtime search path
2927f654740f2a26ad62a5c155af9199af9e69b889clairehoLD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN 
30b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#LD_RPATH_PRE = -Wl,-rpath,
31b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
32b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Compiler switch to embed a library name
33b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru# The initial tab in the next line is to prevent icu-config from reading it.
34b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
35b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#SH# # We can't depend on MIDDLE_SO_TARGET being set.
36b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#SH# LD_SONAME=
37b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
38b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## The type of assembly needed when pkgdata is used for generating shared libraries.
39b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruGENCCODE_ASSEMBLY=-a gcc
40b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
41b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Shared object suffix
42b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSO = so
43b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Non-shared intermediate object suffix
44b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSTATIC_O = ao
45b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
46b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Override the default mechanism for building shared objects
47b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSHLIB.c=      $(CC)  $(CFLAGS)   -qmkshrobj -qpic=large -G $(LDFLAGS) 
48b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruSHLIB.cc=     $(CXX) $(CXXFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS)
49b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
50b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Compilation rules
51b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.$(STATIC_O): $(srcdir)/%.c
52b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
53b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.o: $(srcdir)/%.c
54b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
55b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
56b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.$(STATIC_O): $(srcdir)/%.cpp
57b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
58b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.o: $(srcdir)/%.cpp
59b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
60b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
61b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
62b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Dependency rules
63b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.d: $(srcdir)/%.c
64b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	@echo "generating dependency information for $<"
65b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	@$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
66b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
67b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.d: $(srcdir)/%.cpp
68b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	@echo "generating dependency information for $<"
69b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	@$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
70b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
71b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## Versioned libraries rules
72b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
73b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
74b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(RM) $@ && ln -s ${<F} $@
75b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
76b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru	$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
77b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
78b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru## End Linux-specific setup
79b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru
80