2001-06-01 10:01:09 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## Cygwin-specific setup
|
2005-03-18 05:21:44 +00:00
|
|
|
## Copyright (c) 2001-2005, International Business Machines Corporation and
|
2001-06-01 10:01:09 +00:00
|
|
|
## others. All Rights Reserved.
|
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
|
|
|
|
GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
|
|
|
|
|
2004-09-12 22:30:29 +00:00
|
|
|
## Flags to create/use a static library
|
|
|
|
ifneq ($(ENABLE_SHARED),YES)
|
|
|
|
## Make sure that the static libraries can be built and used
|
|
|
|
CPPFLAGS += -DU_STATIC_IMPLEMENTATION
|
|
|
|
else
|
|
|
|
## Make sure that the static libraries can be built
|
2004-04-28 03:09:32 +00:00
|
|
|
STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
|
2004-09-12 22:30:29 +00:00
|
|
|
endif
|
2004-04-28 03:09:32 +00:00
|
|
|
|
2001-06-01 10:01:09 +00:00
|
|
|
## Flags for position independent code
|
|
|
|
SHAREDLIBCFLAGS =
|
|
|
|
SHAREDLIBCXXFLAGS =
|
|
|
|
SHAREDLIBCPPFLAGS = -DPIC
|
|
|
|
|
|
|
|
## Additional flags when building libraries and with threads
|
|
|
|
LIBCPPFLAGS = -D_REENTRANT
|
|
|
|
THREADSCPPFLAGS = -D_REENTRANT
|
|
|
|
|
2004-05-05 04:15:32 +00:00
|
|
|
# Commands to link. Link with C++ in case static libraries are used.
|
|
|
|
LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
#LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
|
2001-06-01 10:01:09 +00:00
|
|
|
## Commands to make a shared library
|
2004-07-19 14:17:45 +00:00
|
|
|
SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
|
|
|
|
SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
|
2001-06-01 10:01:09 +00:00
|
|
|
|
|
|
|
## Compiler switch to embed a runtime search path
|
|
|
|
LD_RPATH=
|
|
|
|
LD_RPATH_PRE= -Wl,-rpath,
|
|
|
|
|
|
|
|
## Compiler switch to embed a library name
|
2004-03-26 18:07:36 +00:00
|
|
|
LD_SONAME =
|
2001-06-01 10:01:09 +00:00
|
|
|
|
|
|
|
## Shared object suffix
|
2002-01-03 22:35:03 +00:00
|
|
|
SO = dll
|
2001-06-01 10:01:09 +00:00
|
|
|
## Non-shared intermediate object suffix
|
2004-04-28 03:09:32 +00:00
|
|
|
STATIC_O = ao
|
2004-05-05 05:40:08 +00:00
|
|
|
LIBICU = cyg$(ICUPREFIX)
|
2003-02-11 00:13:03 +00:00
|
|
|
|
2004-04-21 20:18:45 +00:00
|
|
|
# Change the stubnames so that poorly working FAT disks and installation programs can work.
|
|
|
|
# This is also for backwards compatibility.
|
|
|
|
DATA_STUBNAME = dt
|
|
|
|
I18N_STUBNAME = in
|
|
|
|
|
2001-06-01 10:01:09 +00:00
|
|
|
## Compilation rules
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
## Dependency rules
|
|
|
|
%.d: $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
2004-02-27 22:54:23 +00:00
|
|
|
@echo -n "$@ " > $@
|
2005-03-18 05:21:44 +00:00
|
|
|
@$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE)
|
2001-06-01 10:01:09 +00:00
|
|
|
|
|
|
|
%.d: $(srcdir)/%.cpp
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
2004-02-27 22:54:23 +00:00
|
|
|
@echo -n "$@ " > $@
|
2005-03-18 05:21:44 +00:00
|
|
|
@$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE)
|
2001-06-01 10:01:09 +00:00
|
|
|
|
2003-02-11 00:13:03 +00:00
|
|
|
## Versioned target for a shared library.
|
2004-05-05 05:40:08 +00:00
|
|
|
## Since symbolic links don't work the same way on Windows,
|
|
|
|
## we only use the version major number.
|
|
|
|
#FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
|
|
|
|
FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2004-10-25 17:01:32 +00:00
|
|
|
MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
|
2001-06-01 10:01:09 +00:00
|
|
|
|
2005-05-25 07:01:32 +00:00
|
|
|
# The following is for Makefile.inc's use.
|
|
|
|
ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
|
|
|
|
|
2003-02-11 00:13:03 +00:00
|
|
|
## Versioned libraries rules
|
2004-05-05 05:40:08 +00:00
|
|
|
#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
|
|
|
|
# $(RM) $@ && cp ${<F} $@
|
|
|
|
%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2004-03-27 00:37:02 +00:00
|
|
|
$(RM) $@ && ln -s ${<F} $@
|
2001-06-01 10:01:09 +00:00
|
|
|
|
2004-11-22 23:27:00 +00:00
|
|
|
## Install libraries as executable
|
|
|
|
INSTALL-L=$(INSTALL_PROGRAM)
|
|
|
|
|
2001-06-01 10:01:09 +00:00
|
|
|
## Bind internal references
|
|
|
|
|
|
|
|
# LDflags that pkgdata will use
|
|
|
|
BIR_LDFLAGS= -Wl,-Bsymbolic
|
|
|
|
|
|
|
|
# CPPflags for genccode/gencmn
|
|
|
|
BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
|
|
|
|
|
|
|
|
# Dependencies [i.e. map files] for the final library
|
|
|
|
BIR_DEPS=
|
|
|
|
|
2002-01-03 22:35:03 +00:00
|
|
|
# Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = PATH
|
|
|
|
|
2004-02-27 22:54:23 +00:00
|
|
|
# The type of assembly to write for generating an object file
|
2004-03-10 18:31:04 +00:00
|
|
|
GENCCODE_ASSEMBLY=-a gcc-cygwin
|
2004-02-27 22:54:23 +00:00
|
|
|
|
2002-01-03 22:35:03 +00:00
|
|
|
## End Cygwin-specific setup
|
2001-06-01 10:01:09 +00:00
|
|
|
|