]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | ## -*-makefile-*- |
2 | ## Cygwin-specific setup | |
73c04bcf | 3 | ## Copyright (c) 2001-2006, International Business Machines Corporation and |
b75a7d8f | 4 | ## others. All Rights Reserved. |
b75a7d8f A |
5 | |
6 | ## Commands to generate dependency files | |
7 | GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) | |
8 | GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) | |
9 | ||
374ca955 A |
10 | ## Flags to create/use a static library |
11 | ifneq ($(ENABLE_SHARED),YES) | |
12 | ## Make sure that the static libraries can be built and used | |
13 | CPPFLAGS += -DU_STATIC_IMPLEMENTATION | |
14 | else | |
15 | ## Make sure that the static libraries can be built | |
16 | STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION | |
17 | endif | |
18 | ||
b75a7d8f A |
19 | ## Flags for position independent code |
20 | SHAREDLIBCFLAGS = | |
21 | SHAREDLIBCXXFLAGS = | |
22 | SHAREDLIBCPPFLAGS = -DPIC | |
23 | ||
24 | ## Additional flags when building libraries and with threads | |
b75a7d8f | 25 | THREADSCPPFLAGS = -D_REENTRANT |
73c04bcf | 26 | LIBCPPFLAGS = |
b75a7d8f | 27 | |
374ca955 A |
28 | # Commands to link. Link with C++ in case static libraries are used. |
29 | LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
30 | #LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
31 | ||
b75a7d8f | 32 | ## Commands to make a shared library |
374ca955 A |
33 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared |
34 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared | |
b75a7d8f A |
35 | |
36 | ## Compiler switch to embed a runtime search path | |
37 | LD_RPATH= | |
38 | LD_RPATH_PRE= -Wl,-rpath, | |
39 | ||
40 | ## Compiler switch to embed a library name | |
374ca955 | 41 | LD_SONAME = |
b75a7d8f A |
42 | |
43 | ## Shared object suffix | |
44 | SO = dll | |
45 | ## Non-shared intermediate object suffix | |
374ca955 A |
46 | STATIC_O = ao |
47 | LIBICU = cyg$(ICUPREFIX) | |
b75a7d8f | 48 | |
374ca955 A |
49 | # Change the stubnames so that poorly working FAT disks and installation programs can work. |
50 | # This is also for backwards compatibility. | |
51 | DATA_STUBNAME = dt | |
52 | I18N_STUBNAME = in | |
b75a7d8f A |
53 | |
54 | ## Compilation rules | |
55 | %.$(STATIC_O): $(srcdir)/%.c | |
56 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
57 | %.o: $(srcdir)/%.c | |
58 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
59 | ||
60 | %.$(STATIC_O): $(srcdir)/%.cpp | |
61 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
62 | %.o: $(srcdir)/%.cpp | |
63 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
64 | ||
b75a7d8f A |
65 | |
66 | ## Dependency rules | |
67 | %.d: $(srcdir)/%.c | |
68 | @echo "generating dependency information for $<" | |
374ca955 | 69 | @echo -n "$@ " > $@ |
73c04bcf | 70 | @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE) |
b75a7d8f A |
71 | |
72 | %.d: $(srcdir)/%.cpp | |
73 | @echo "generating dependency information for $<" | |
374ca955 | 74 | @echo -n "$@ " > $@ |
73c04bcf | 75 | @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE) |
b75a7d8f A |
76 | |
77 | ## Versioned target for a shared library. | |
374ca955 A |
78 | ## Since symbolic links don't work the same way on Windows, |
79 | ## we only use the version major number. | |
80 | #FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO) | |
81 | FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) | |
82 | MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) | |
b75a7d8f | 83 | |
73c04bcf A |
84 | # The following is for Makefile.inc's use. |
85 | ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) | |
86 | ||
b75a7d8f | 87 | ## Versioned libraries rules |
374ca955 A |
88 | #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO) |
89 | # $(RM) $@ && cp ${<F} $@ | |
90 | %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO) | |
91 | $(RM) $@ && ln -s ${<F} $@ | |
b75a7d8f | 92 | |
73c04bcf A |
93 | ## Install libraries as executable |
94 | INSTALL-L=$(INSTALL_PROGRAM) | |
95 | ||
b75a7d8f A |
96 | ## Bind internal references |
97 | ||
98 | # LDflags that pkgdata will use | |
99 | BIR_LDFLAGS= -Wl,-Bsymbolic | |
100 | ||
b75a7d8f A |
101 | # Dependencies [i.e. map files] for the final library |
102 | BIR_DEPS= | |
103 | ||
104 | # Environment variable to set a runtime search path | |
105 | LDLIBRARYPATH_ENVVAR = PATH | |
106 | ||
374ca955 A |
107 | # The type of assembly to write for generating an object file |
108 | GENCCODE_ASSEMBLY=-a gcc-cygwin | |
109 | ||
73c04bcf A |
110 | # put this here again so it gets cyguc... |
111 | ||
112 | #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" | |
113 | ||
114 | # for icu-config | |
115 | ||
116 | #SH### copied from Makefile.inc | |
117 | #SH#ICULIBS_COMMON="-l${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
118 | #SH#ICULIBS_DATA="-l${LIBICU}${DATA_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
119 | #SH#ICULIBS_I18N="-l${LIBICU}${I18N_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
120 | #SH#ICULIBS_TOOLUTIL="-l${LIBICU}tu${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
121 | #SH#ICULIBS_CTESTFW="-l${LIBICU}ctestfw${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
122 | #SH#ICULIBS_ICUIO="-l${LIBICU}io${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
123 | #SH#ICULIBS_OBSOLETE="-l${LIBICU}obsolete${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
124 | #SH#ICULIBS_LAYOUT="-l${LIBICU}le${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
125 | #SH#ICULIBS_LAYOUTEX="-l${LIBICU}lx${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}" | |
126 | #SH#ICULIBS_BASE="${LIBS} -L${libdir}" | |
127 | #SH#ICULIBS="${ICULIBS_BASE} ${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA}" | |
128 | ||
b75a7d8f A |
129 | ## End Cygwin-specific setup |
130 |