1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 #**********************************************************************
4 #* Copyright (C) 1999-2008, International Business Machines Corporation
5 #* and others. All Rights Reserved.
6 #**********************************************************************
7 # nmake file for creating data files on win32
9 # nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release]
11 # 12/10/1999 weiv Created
13 #If no config, we default to debug
16 !MESSAGE No configuration specified. Defaulting to common - Win32 Debug.
19 #Here we test if a valid configuration is given
20 !IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug" && "$(CFG)" != "x86\Release" && "$(CFG)" != "x86\Debug" && "$(CFG)" != "x64\Release" && "$(CFG)" != "x64\Debug"
21 !MESSAGE Invalid configuration "$(CFG)" specified.
22 !MESSAGE You can specify a configuration when running NMAKE
23 !MESSAGE by defining the macro CFG on the command line. For example:
25 !MESSAGE NMAKE /f "makedata.mak" CFG="Debug"
27 !MESSAGE Possible choices for configuration are:
32 !ERROR An invalid configuration is specified.
35 #Let's see if user has given us a path to ICU
36 #This could be found according to the path to makefile, but for now it is this way
38 !ERROR Can't find path!
40 !MESSAGE ICU path is $(ICUP)
47 # set the following to 'static' or 'dll' depending
51 DATA_PATH=$(ICUP)\data^\
53 !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug"
54 ICUTOOLS=$(ICUP)\bin64
55 PATH = $(ICUP)\bin64;$(PATH)
58 PATH = $(ICUP)\bin;$(PATH)
61 # Suffixes for data files
62 .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c
64 # We're including a list of resource files.
67 !IF EXISTS("$(RESFILES)")
68 !INCLUDE "$(RESFILES)"
70 !ERROR ERROR: cannot find "$(RESFILES)"
72 RES_FILES = $(RESSRC:.txt=.res)
73 RB_FILES = resources\$(RES_FILES:.res =.res resources\)
76 # This target should build all the data files
77 !IF "$(PKGMODE)" == "dll"
78 OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll"
80 OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib"
84 @echo All targets are up to date (mode $(PKGMODE))
87 # invoke pkgdata - static
88 "$(DLL_OUTPUT)\$(RESNAME).lib" : $(RB_FILES) $(RESFILES)
89 @echo Building $(RESNAME).lib
90 @"$(ICUTOOLS)\pkgdata" -f -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <<pkgdatain.txt
91 $(RES_FILES:.res =.res
95 # This is to remove all the data files
98 -@erase "$(CFG)\*uconvmsg*.*"
99 -@"$(ICUTOOLS)\pkgdata" -f --clean -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" pkgdatain.txt
101 # Inference rule for creating resource bundles
102 {$(RESDIR)}.txt{$(RESDIR)}.res:
103 @echo Making Resource Bundle files
104 "$(ICUTOOLS)\genrb" -s $(@D) -d $(@D) $(?F)
107 $(RESSRC) : {"$(ICUTOOLS)"}genrb.exe