12e5b6d6dSopenharmony_ci# 22e5b6d6dSopenharmony_ci# Copyright (C) 2017 and later: Unicode, Inc. and others. 32e5b6d6dSopenharmony_ci# License & terms of use: http://www.unicode.org/copyright.html 42e5b6d6dSopenharmony_ci# 52e5b6d6dSopenharmony_ci# Copyright (c) 2009-2013 IBM Corp. and Others. All Rights Reserved 62e5b6d6dSopenharmony_ci# multicu/c makefile 72e5b6d6dSopenharmony_ci 82e5b6d6dSopenharmony_ciall: 92e5b6d6dSopenharmony_ci @echo To build all ICUs: $(MAKE) all-icus 102e5b6d6dSopenharmony_ci @echo "Using the -k option may be a good idea if some are not building properly." 112e5b6d6dSopenharmony_ci @echo ICUVERS: $(ICUVERS) 122e5b6d6dSopenharmony_ci 132e5b6d6dSopenharmony_ciinfo: 142e5b6d6dSopenharmony_ci 152e5b6d6dSopenharmony_ci#ICUCONF=sh ./configure 162e5b6d6dSopenharmony_ciICUCONF=$(MULTICU_ROOT)/c/superconf.sh 172e5b6d6dSopenharmony_ciDOT=$(shell pwd) 182e5b6d6dSopenharmony_ciMULTICU_ROOT=$(DOT)/.. 192e5b6d6dSopenharmony_ciinclude $(MULTICU_ROOT)/common/Makefile-multi.inc 202e5b6d6dSopenharmony_ci-include Makefile.local 212e5b6d6dSopenharmony_ci 222e5b6d6dSopenharmony_ciICUVERS:=$(shell cd $(ICUS); ls icu4c*.tgz | cut -d- -f2 | sort | uniq | fgrep -v -f $(MULTICU_ROOT)/c/old-icu.txt) 232e5b6d6dSopenharmony_ciICU4JVERS:=$(shell cd $(ICUS); ls icu4j*.jar | cut -d- -f2 | cut -d. -f1 | sort | uniq | fgrep -v -f $(MULTICU_ROOT)/j/old-icu4j.txt) 242e5b6d6dSopenharmony_ci 252e5b6d6dSopenharmony_ciBLD=$(C_BLD) 262e5b6d6dSopenharmony_ciINS=$(C_INS) 272e5b6d6dSopenharmony_ciSRC=$(C_SRC) 282e5b6d6dSopenharmony_ci 292e5b6d6dSopenharmony_ciALLICUS=$(ICUVERS:%=$(BLD)/%/$(S_BLD)) $(ICUVERS:%=$(BLD)/r%/$(S_BLD)) 302e5b6d6dSopenharmony_ciRICUS=$(ICUVERS:%=$(INS)/r%/$(S_INS)) 312e5b6d6dSopenharmony_ciIICUS=$(ICUVERS:%=$(INS)/%/$(S_INS)) $(RICUS) 322e5b6d6dSopenharmony_ci 332e5b6d6dSopenharmony_ci 342e5b6d6dSopenharmony_ciAPRECIOUS=$(ICUVERS:%=$(BLD)/%/$(S_SRC)) $(ICUVERS:%=$(BLD)/r%/$(S_SRC)) $(ICUVERS:%=$(BLD)/%/$(S_BLD)) $(ICUVERS:%=$(INS)/%/$(S_INS)) $(ICUVERS:%=$(BLD)/r%/$(S_BLD)) $(ICUVERS:%=$(INS)/r%/$(S_INS)) 352e5b6d6dSopenharmony_ci 362e5b6d6dSopenharmony_ci.PRECIOUS: $(APRECIOUS) 372e5b6d6dSopenharmony_ci 382e5b6d6dSopenharmony_citehprecious: 392e5b6d6dSopenharmony_ci echo $(APRECIOUS) 402e5b6d6dSopenharmony_ci 412e5b6d6dSopenharmony_ci$(M_TMP) $(BLD) $(INS): 422e5b6d6dSopenharmony_ci mkdir $(M_TMP) 432e5b6d6dSopenharmony_ci mkdir $(BLD) $(SRC) $(INS) 442e5b6d6dSopenharmony_ci 452e5b6d6dSopenharmony_ci$(INS)/%/$(S_INS): $(BLD)/%/$(S_BLD) 462e5b6d6dSopenharmony_ci @if [ -f $(BLD)/$*/build.err ]; then echo '###' Error for $* stored in $(BLD)/$*/build.err - remove if you want me to retry; false; fi 472e5b6d6dSopenharmony_ci ( make $(MAKE_OPTS) -C $(BLD)/$*/icu/source 2>&1 all install | tee $(BLD)/$*/build.log ) || ( mv $(BLD)/$*/build.log $(BLD)/$*/build.err ; false ) 482e5b6d6dSopenharmony_ci touch -c $@ 492e5b6d6dSopenharmony_ci 502e5b6d6dSopenharmony_ci$(INS)/r%/$(S_INS): $(BLD)/r%/$(S_BLD) 512e5b6d6dSopenharmony_ci @if [ -f $(BLD)/r$*/build.err ]; then echo '###' Error for $* stored in $(BLD)/r$*/build.err - remove if you want me to retry; false; fi 522e5b6d6dSopenharmony_ci ( make $(MAKE_OPTS) -C $(BLD)/r$*/icu/source 2>&1 all install | tee $(BLD)/r$*/build.log ) || ( mv $(BLD)/r$*/build.log $(BLD)/r$*/build.err ; false ) 532e5b6d6dSopenharmony_ci touch -c $@ 542e5b6d6dSopenharmony_ci 552e5b6d6dSopenharmony_ci$(BLD)/r%/$(S_SRC): $(ICUS)/icu4c-%-src.tgz 562e5b6d6dSopenharmony_ci -mv $(BLD)/r$* $(BLD)/r$*.old 572e5b6d6dSopenharmony_ci -( rm -rf ./$(BLD)/r$*.old& ) 582e5b6d6dSopenharmony_ci mkdir -p $(BLD)/r$* 592e5b6d6dSopenharmony_ci ( cd $(BLD)/r$* ; gunzip -d < $^ | tar xfp - ) 602e5b6d6dSopenharmony_ci ([ -f $(DOT)/patch/$* ] && patch -d $(BLD)/r$* -p1 < $(DOT)/patch/$*) || true 612e5b6d6dSopenharmony_ci touch -c $@ 622e5b6d6dSopenharmony_ci 632e5b6d6dSopenharmony_ci$(BLD)/%/$(S_SRC): $(ICUS)/icu4c-%-src.tgz 642e5b6d6dSopenharmony_ci -mv $(BLD)/$* $(BLD)/$*.old 652e5b6d6dSopenharmony_ci -( rm -rf ./$(BLD)/$*.old& ) 662e5b6d6dSopenharmony_ci mkdir -p $(BLD)/$* 672e5b6d6dSopenharmony_ci ( cd $(BLD)/$* ; gunzip -d < $^ | tar xfp - ) 682e5b6d6dSopenharmony_ci ([ -f $(DOT)/patch/$* ] && patch -d $(BLD)/$* -p1 < $(DOT)/patch/$*) || true 692e5b6d6dSopenharmony_ci touch -c $@ 702e5b6d6dSopenharmony_ci 712e5b6d6dSopenharmony_ci 722e5b6d6dSopenharmony_ci$(BLD)/r%/$(S_BLD): $(BLD)/r%/$(S_SRC) 732e5b6d6dSopenharmony_ci -mkdir -p $(INS) 742e5b6d6dSopenharmony_ci -chmod a+rx $(BLD)/r$*/icu/source/configure $(BLD)/r$*/icu/source/runConfigureICU 752e5b6d6dSopenharmony_ci ( cd $(BLD)/r$*/icu/source ; env CPPFLAGS="$(XTRA_RICU_CPPFLAGS)" `$(ICUCONF) "$(BLD)/r$*/icu/source" "$*"` --enable-renaming --enable-shared --disable-static --enable-release --disable-debug --prefix=$(INS)/r$* ) 762e5b6d6dSopenharmony_ci touch -c $@ 772e5b6d6dSopenharmony_ci 782e5b6d6dSopenharmony_ci$(BLD)/%/$(S_BLD): $(BLD)/%/$(S_SRC) 792e5b6d6dSopenharmony_ci -mkdir -p $(INS) 802e5b6d6dSopenharmony_ci -chmod a+rx $(BLD)/$*/icu/source/configure $(BLD)/$*/icu/source/runConfigureICU 812e5b6d6dSopenharmony_ci ( cd $(BLD)/$*/icu/source ; env CPPFLAGS="$(XTRA_ICU_CPPFLAGS)" `$(ICUCONF) "$(BLD)/$*/icu/source" "$*"` --disable-renaming --enable-shared --disable-static --enable-release --disable-debug --prefix=$(INS)/$* ) 822e5b6d6dSopenharmony_ci touch -c $@ 832e5b6d6dSopenharmony_ci 842e5b6d6dSopenharmony_ci 852e5b6d6dSopenharmony_ci$(INS)/%/bin/$(TARGET): $(INS)/%/$(S_INS) $(SRCS) 862e5b6d6dSopenharmony_ci# Don't delete the built version. 872e5b6d6dSopenharmony_ci# -rm -rf ./$(BLD)/$*/tmp 882e5b6d6dSopenharmony_ci mkdir ./$(BLD)/$*/tmp 892e5b6d6dSopenharmony_ci @for file in $(OBJECTS); \ 902e5b6d6dSopenharmony_ci do \ 912e5b6d6dSopenharmony_ci what=`basename $$file .o` ; \ 922e5b6d6dSopenharmony_ci echo compiling $*/$$what ; \ 932e5b6d6dSopenharmony_ci echo $(CXX) -c -o ./$(BLD)/$*/tmp/$$what.o $$what.cpp -I $(INS)/$*/include -I $(BLD)/$*/icu/source/tools/toolutil ; \ 942e5b6d6dSopenharmony_ci $(CXX) -c -o ./$(BLD)/$*/tmp/$$what.o $$what.cpp -I $(INS)/$*/include -I $(BLD)/$*/icu/source/tools/toolutil ; \ 952e5b6d6dSopenharmony_ci done 962e5b6d6dSopenharmony_ci $(CXX) -o $@ $(OBJECTS:%.o=./$(BLD)/$*/tmp/%.o) -licudata -licuuc -licutu -licui18n -L$(INS)/$*/lib 972e5b6d6dSopenharmony_ci 982e5b6d6dSopenharmony_cifoo: 992e5b6d6dSopenharmony_ci echo $(ALLICUS) 1002e5b6d6dSopenharmony_ci 1012e5b6d6dSopenharmony_ciallicus: $(BLD) $(ALLICUS) 1022e5b6d6dSopenharmony_ci 1032e5b6d6dSopenharmony_ci 1042e5b6d6dSopenharmony_ciall-icus: iicus 1052e5b6d6dSopenharmony_ci 1062e5b6d6dSopenharmony_ciiicus: $(BLD) $(IICUS) 1072e5b6d6dSopenharmony_ci 1082e5b6d6dSopenharmony_ciricus: $(RICUS) 109