]> git.saurik.com Git - apple/icu.git/blob - icuSources/extra/ustdio/Makefile.in
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / extra / ustdio / Makefile.in
1 #******************************************************************************
2 #
3 # Copyright (C) 1999-2003, International Business Machines
4 # Corporation and others. All Rights Reserved.
5 #
6 #******************************************************************************
7 ## Makefile.in for ICU - extra/ustdio/libustdio.so
8 ## Stephen F. Booth
9
10 ## Source directory information
11 srcdir = @srcdir@
12 top_srcdir = @top_srcdir@
13
14 top_builddir = ../..
15
16 ## All the flags and other definitions are included here.
17 include $(top_builddir)/icudefs.mk
18
19 ## Build directory information
20 subdir = extra/ustdio
21
22 ## Extra files to remove for 'make clean'
23 CLEANFILES = *~ $(DEPS)
24
25 ## Target information
26
27 TARGET_STUBNAME=io
28
29 ifneq ($(ENABLE_STATIC),)
30 TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).a
31 endif
32
33 ifneq ($(ENABLE_SHARED),)
34 SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
35 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET)
36
37 ifeq ($(OS390BATCH),1)
38 BATCH_TARGET = $(BATCH_USTDIO_TARGET)
39 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICUI18N) -lm
40 endif # OS390BATCH
41
42 endif
43
44 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
45
46 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
47 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
48 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
49
50 CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS)
51 DEFS += -DU_USTDIO_IMPLEMENTATION
52 LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS)
53
54 OBJECTS = locbund.o loccache.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \
55 uscanf.o uscanf_p.o uscanset.o ustdio.o sprintf.o sprntf_p.o \
56 sscanf.o sscanf_p.o ustream.o
57
58 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
59
60 HEADERS = $(srcdir)/unicode/*.h
61
62 DEPS = $(OBJECTS:.o=.d)
63
64 ## List of phony targets
65 .PHONY : all all-local install install-local clean clean-local \
66 distclean distclean-local dist dist-local check check-local
67
68 ## Clear suffix list
69 .SUFFIXES :
70
71 ## List of standard targets
72 all: all-local
73 install: install-local
74 clean: clean-local
75 distclean : distclean-local
76 dist: dist-local
77 check: all check-local
78
79 all-local: $(ALL_TARGETS)
80
81 install-local: all-local install-headers install-library
82
83 install-library: all-local
84 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
85 ifneq ($(ENABLE_STATIC),)
86 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
87 endif
88 ifneq ($(ENABLE_SHARED),)
89 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET)
90 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
91 cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET)
92 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
93 cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET)
94 endif
95 endif
96 endif
97 ifneq ($(IMPORT_LIB_EXT),)
98 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)/$(FINAL_IMPORT_LIB)
99 cd $(DESTDIR)$(libdir) && $(RM) $(IMPORT_LIB) && ln -s $(FINAL_IMPORT_LIB) $(IMPORT_LIB)
100 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
101 cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_IMPORT_LIB) && ln -s $(FINAL_IMPORT_LIB) $(MIDDLE_IMPORT_LIB)
102 endif
103 endif
104
105 install-headers:
106 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
107 @for file in $(HEADERS); do \
108 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
109 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
110 done
111
112
113 dist-local:
114
115 clean-local:
116 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
117 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
118
119 distclean-local: clean-local
120 $(RMV) Makefile
121
122 check-local:
123
124 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
125 cd $(top_builddir) \
126 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
127
128 ifneq ($(ENABLE_STATIC),)
129 $(TARGET): $(TARGET)($(STATIC_OBJECTS))
130 $(RANLIB) $@
131 endif
132
133 ifneq ($(ENABLE_SHARED),)
134 $(FINAL_SO_TARGET): $(OBJECTS)
135 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
136
137 ifeq ($(OS390BATCH),1)
138 $(BATCH_TARGET): $(OBJECTS)
139 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
140 endif # OS390BATCH
141
142 endif
143
144 ifeq (,$(MAKECMDGOALS))
145 -include $(DEPS)
146 else
147 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
148 -include $(DEPS)
149 endif
150 endif