1 ## Makefile for rebuilding 'unsafe backward' data
2 ## Copyright (c) 2015, International Business Machines Corporation and
3 ## others. All Rights Reserved.
7 ## 1. create Makefile.local containing overrides if necessary:
8 ## BUILD_ROOT=/home/user/icu-build (location of 'config.status' etc.)
9 ## PATH_VAR=DYLD_LIBRARY_PATH (if on OSX etc)
12 ## 1. make 'reset-icu' will reset ICU to 'bootstrap' state, zeroing out source/i18n/collunsafe.h
13 ## 2. make 'gen-file' will generate and test source/i18n/collunsafe.h
15 subdir=tools/gencolusb
17 SOURCE_ROOT=$(shell cd ../.. ; pwd)
18 BUILD_ROOT=$(SOURCE_ROOT)
19 BUILD_HERE=$(BUILD_ROOT)/$(subdir)
20 TOOL=extract_unsafe_backwards
22 PATH_VAR=LD_LIBRARY_PATH
24 -include Makefile.local
26 GEN_FILE=$(SOURCE_ROOT)/i18n/collunsafe.h
27 BUILD_OPTS=-I$(SOURCE_ROOT)/common -I$(SOURCE_ROOT)/i18n -L$(BUILD_ROOT)/lib -licuuc -licui18n -licudata
28 RUN_OPTS=env $(PATH_VAR)=$(BUILD_ROOT)/lib
32 $(MAKE) -C $(BUILD_ROOT)/i18n
35 mkdir -p $(BUILD_HERE)
36 $(CXX) -o $(BUILD_HERE)/$(TOOL) $(srcdir)/$(TOOL).cpp $(BUILD_OPTS)
37 $(RUN_OPTS) $(BUILD_HERE)/$(TOOL) > $(GEN_FILE) || exit 1
38 $(CXX) -o $(BUILD_HERE)/$(TEST) $(srcdir)/$(TEST).cpp $(BUILD_OPTS)
39 $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1
40 $(MAKE) -C $(BUILD_ROOT)/i18n
41 $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1
43 .PHONY: reset-icu gen-file