1 ## Makefile for rebuilding 'unsafe backward' data
2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## Copyright (c) 2015, International Business Machines Corporation and
5 ## others. All Rights Reserved.
9 ## 1. create Makefile.local containing overrides if necessary:
10 ## BUILD_ROOT=/home/user/icu-build (location of 'config.status' etc.)
11 ## PATH_VAR=DYLD_LIBRARY_PATH (if on OSX etc)
14 ## 1. make 'reset-icu' will reset ICU to 'bootstrap' state, zeroing out source/i18n/collunsafe.h
15 ## 2. make 'gen-file' will generate and test source/i18n/collunsafe.h
17 subdir=tools/gencolusb
19 SOURCE_ROOT=$(shell cd ../.. ; pwd)
20 BUILD_ROOT=$(SOURCE_ROOT)
21 BUILD_HERE=$(BUILD_ROOT)/$(subdir)
22 TOOL=extract_unsafe_backwards
24 PATH_VAR=LD_LIBRARY_PATH
26 -include Makefile.local
28 GEN_FILE=$(SOURCE_ROOT)/i18n/collunsafe.h
29 BUILD_OPTS=-I$(SOURCE_ROOT)/common -I$(SOURCE_ROOT)/i18n -L$(BUILD_ROOT)/lib -licuuc -licui18n -licudata
30 RUN_OPTS=env $(PATH_VAR)=$(BUILD_ROOT)/lib
34 $(MAKE) -C $(BUILD_ROOT)/i18n
37 mkdir -p $(BUILD_HERE)
38 $(CXX) -o $(BUILD_HERE)/$(TOOL) $(srcdir)/$(TOOL).cpp $(BUILD_OPTS)
39 $(RUN_OPTS) $(BUILD_HERE)/$(TOOL) > $(GEN_FILE) || exit 1
40 $(CXX) -o $(BUILD_HERE)/$(TEST) $(srcdir)/$(TEST).cpp $(BUILD_OPTS)
41 $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1
42 $(MAKE) -C $(BUILD_ROOT)/i18n
43 $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1
45 .PHONY: reset-icu gen-file