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) 2008-2009 IBM Corp. and Others. All Rights Reserved 62e5b6d6dSopenharmony_ci# Makefile for multicu/sample/chello 72e5b6d6dSopenharmony_ci# C/C++ hello 82e5b6d6dSopenharmony_ci 92e5b6d6dSopenharmony_ci## Name of the app 102e5b6d6dSopenharmony_ciTARGET=chello 112e5b6d6dSopenharmony_ci 122e5b6d6dSopenharmony_ci## Sources list (C and C++ just to be difficult) 132e5b6d6dSopenharmony_ciC_SOURCES=date.c 142e5b6d6dSopenharmony_ciCXX_SOURCES=uprint.cpp 152e5b6d6dSopenharmony_ciSRCS=$(C_SOURCES) $(CXX_SOURCES) 162e5b6d6dSopenharmony_ciHEADERS=uprint.h 172e5b6d6dSopenharmony_ci 182e5b6d6dSopenharmony_ciall: 192e5b6d6dSopenharmony_ci @echo To build and list "'" $(OUTFILES) "'" in "'" $(C_GOOD) "'" use "$(MAKE) check" 202e5b6d6dSopenharmony_ci 212e5b6d6dSopenharmony_ci## Setup multicu 222e5b6d6dSopenharmony_ciMULTICU_ROOT=../../ 232e5b6d6dSopenharmony_ciinclude $(MULTICU_ROOT)/c/Makefile-c.inc 242e5b6d6dSopenharmony_ci 252e5b6d6dSopenharmony_ciOUT=out 262e5b6d6dSopenharmony_ci 272e5b6d6dSopenharmony_ci$(OUT): 282e5b6d6dSopenharmony_ci mkdir $(OUT) 292e5b6d6dSopenharmony_ci 302e5b6d6dSopenharmony_ci## The output files. Will result in: out/3_8.txt out/4_0.txt etc. 312e5b6d6dSopenharmony_ciOUTFILES=$(C_GOOD:%=$(OUT)/%.txt) 322e5b6d6dSopenharmony_ci 332e5b6d6dSopenharmony_ci.PRECIOUS: $(C_CLEAN_TARGET) 342e5b6d6dSopenharmony_ci 352e5b6d6dSopenharmony_ci## Generate a file 362e5b6d6dSopenharmony_ci$(OUT)/%.txt: $(OUT) $(C_INS)/%/bin/$(TARGET) 372e5b6d6dSopenharmony_ci $(shell $(C_INS)/$*/bin/icu-config --invoke) $(C_INS)/$*/bin/$(TARGET) > $@ 382e5b6d6dSopenharmony_ci 392e5b6d6dSopenharmony_ci## clean 402e5b6d6dSopenharmony_ciclean: 412e5b6d6dSopenharmony_ci -rm -f $(C_CLEAN_TARGET) 422e5b6d6dSopenharmony_ci -rm -f ./$(OUT)/* 432e5b6d6dSopenharmony_ci -rmdir $(OUT) 442e5b6d6dSopenharmony_ci 452e5b6d6dSopenharmony_ci## Just generate 462e5b6d6dSopenharmony_cioutfiles: $(OUTFILES) 472e5b6d6dSopenharmony_ci 482e5b6d6dSopenharmony_ci## Test: generate out files, and print them. 492e5b6d6dSopenharmony_cicheck: $(OUTFILES) 502e5b6d6dSopenharmony_ci @for file in $(OUTFILES); \ 512e5b6d6dSopenharmony_ci do \ 522e5b6d6dSopenharmony_ci echo; \ 532e5b6d6dSopenharmony_ci sed -e "s%^%$$file: %g" < $$file; \ 542e5b6d6dSopenharmony_ci done 552e5b6d6dSopenharmony_ci 56