• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) 2008-2009 IBM Corp. and Others. All Rights Reserved
6# Makefile for multicu/sample/chello
7# C/C++ hello
8
9## Name of the app
10TARGET=chello
11
12## Sources list (C and C++ just to be difficult)
13C_SOURCES=date.c
14CXX_SOURCES=uprint.cpp
15SRCS=$(C_SOURCES) $(CXX_SOURCES)
16HEADERS=uprint.h
17
18all:
19	@echo To build and list "'" $(OUTFILES) "'"  in "'" $(C_GOOD) "'" use "$(MAKE) check"
20
21## Setup multicu
22MULTICU_ROOT=../../
23include $(MULTICU_ROOT)/c/Makefile-c.inc
24
25OUT=out
26
27$(OUT):
28	mkdir $(OUT)
29
30## The output files.  Will result in:   out/3_8.txt  out/4_0.txt  etc.
31OUTFILES=$(C_GOOD:%=$(OUT)/%.txt)
32
33.PRECIOUS: $(C_CLEAN_TARGET)
34
35## Generate a file
36$(OUT)/%.txt: $(OUT) $(C_INS)/%/bin/$(TARGET)
37	$(shell $(C_INS)/$*/bin/icu-config --invoke) $(C_INS)/$*/bin/$(TARGET)  > $@
38
39## clean
40clean:
41	-rm -f $(C_CLEAN_TARGET)
42	-rm -f ./$(OUT)/*
43	-rmdir $(OUT)
44
45## Just generate
46outfiles: $(OUTFILES)
47
48## Test: generate out files, and print them.
49check: $(OUTFILES)
50	@for file in $(OUTFILES); \
51	do \
52		echo; \
53		sed -e "s%^%$$file: %g" < $$file; \
54	done
55
56