1# 2# Copyright (C) 2017 and later: Unicode, Inc. and others. 3# License & terms of use: http://www.unicode.org/copyright.html 4# 5# Copyright (c) 2009-2013 IBM Corp. and Others. All Rights Reserved 6# multicu/c makefile 7 8all: 9 @echo To build all ICUs: $(MAKE) all-icus 10 @echo "Using the -k option may be a good idea if some are not building properly." 11 @echo ICUVERS: $(ICUVERS) 12 13info: 14 15#ICUCONF=sh ./configure 16ICUCONF=$(MULTICU_ROOT)/c/superconf.sh 17DOT=$(shell pwd) 18MULTICU_ROOT=$(DOT)/.. 19include $(MULTICU_ROOT)/common/Makefile-multi.inc 20-include Makefile.local 21 22ICUVERS:=$(shell cd $(ICUS); ls icu4c*.tgz | cut -d- -f2 | sort | uniq | fgrep -v -f $(MULTICU_ROOT)/c/old-icu.txt) 23ICU4JVERS:=$(shell cd $(ICUS); ls icu4j*.jar | cut -d- -f2 | cut -d. -f1 | sort | uniq | fgrep -v -f $(MULTICU_ROOT)/j/old-icu4j.txt) 24 25BLD=$(C_BLD) 26INS=$(C_INS) 27SRC=$(C_SRC) 28 29ALLICUS=$(ICUVERS:%=$(BLD)/%/$(S_BLD)) $(ICUVERS:%=$(BLD)/r%/$(S_BLD)) 30RICUS=$(ICUVERS:%=$(INS)/r%/$(S_INS)) 31IICUS=$(ICUVERS:%=$(INS)/%/$(S_INS)) $(RICUS) 32 33 34APRECIOUS=$(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)) 35 36.PRECIOUS: $(APRECIOUS) 37 38tehprecious: 39 echo $(APRECIOUS) 40 41$(M_TMP) $(BLD) $(INS): 42 mkdir $(M_TMP) 43 mkdir $(BLD) $(SRC) $(INS) 44 45$(INS)/%/$(S_INS): $(BLD)/%/$(S_BLD) 46 @if [ -f $(BLD)/$*/build.err ]; then echo '###' Error for $* stored in $(BLD)/$*/build.err - remove if you want me to retry; false; fi 47 ( make $(MAKE_OPTS) -C $(BLD)/$*/icu/source 2>&1 all install | tee $(BLD)/$*/build.log ) || ( mv $(BLD)/$*/build.log $(BLD)/$*/build.err ; false ) 48 touch -c $@ 49 50$(INS)/r%/$(S_INS): $(BLD)/r%/$(S_BLD) 51 @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 52 ( 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 ) 53 touch -c $@ 54 55$(BLD)/r%/$(S_SRC): $(ICUS)/icu4c-%-src.tgz 56 -mv $(BLD)/r$* $(BLD)/r$*.old 57 -( rm -rf ./$(BLD)/r$*.old& ) 58 mkdir -p $(BLD)/r$* 59 ( cd $(BLD)/r$* ; gunzip -d < $^ | tar xfp - ) 60 ([ -f $(DOT)/patch/$* ] && patch -d $(BLD)/r$* -p1 < $(DOT)/patch/$*) || true 61 touch -c $@ 62 63$(BLD)/%/$(S_SRC): $(ICUS)/icu4c-%-src.tgz 64 -mv $(BLD)/$* $(BLD)/$*.old 65 -( rm -rf ./$(BLD)/$*.old& ) 66 mkdir -p $(BLD)/$* 67 ( cd $(BLD)/$* ; gunzip -d < $^ | tar xfp - ) 68 ([ -f $(DOT)/patch/$* ] && patch -d $(BLD)/$* -p1 < $(DOT)/patch/$*) || true 69 touch -c $@ 70 71 72$(BLD)/r%/$(S_BLD): $(BLD)/r%/$(S_SRC) 73 -mkdir -p $(INS) 74 -chmod a+rx $(BLD)/r$*/icu/source/configure $(BLD)/r$*/icu/source/runConfigureICU 75 ( 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$* ) 76 touch -c $@ 77 78$(BLD)/%/$(S_BLD): $(BLD)/%/$(S_SRC) 79 -mkdir -p $(INS) 80 -chmod a+rx $(BLD)/$*/icu/source/configure $(BLD)/$*/icu/source/runConfigureICU 81 ( 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)/$* ) 82 touch -c $@ 83 84 85$(INS)/%/bin/$(TARGET): $(INS)/%/$(S_INS) $(SRCS) 86# Don't delete the built version. 87# -rm -rf ./$(BLD)/$*/tmp 88 mkdir ./$(BLD)/$*/tmp 89 @for file in $(OBJECTS); \ 90 do \ 91 what=`basename $$file .o` ; \ 92 echo compiling $*/$$what ; \ 93 echo $(CXX) -c -o ./$(BLD)/$*/tmp/$$what.o $$what.cpp -I $(INS)/$*/include -I $(BLD)/$*/icu/source/tools/toolutil ; \ 94 $(CXX) -c -o ./$(BLD)/$*/tmp/$$what.o $$what.cpp -I $(INS)/$*/include -I $(BLD)/$*/icu/source/tools/toolutil ; \ 95 done 96 $(CXX) -o $@ $(OBJECTS:%.o=./$(BLD)/$*/tmp/%.o) -licudata -licuuc -licutu -licui18n -L$(INS)/$*/lib 97 98foo: 99 echo $(ALLICUS) 100 101allicus: $(BLD) $(ALLICUS) 102 103 104all-icus: iicus 105 106iicus: $(BLD) $(IICUS) 107 108ricus: $(RICUS) 109