]> git.saurik.com Git - apple/icu.git/blame - icuSources/extra/uconv/makedata.mak
ICU-59180.0.1.tar.gz
[apple/icu.git] / icuSources / extra / uconv / makedata.mak
CommitLineData
f3c0d7a5
A
1# Copyright (C) 2016 and later: Unicode, Inc. and others.
2# License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f 3#**********************************************************************
729e4ab9 4#* Copyright (C) 1999-2008, International Business Machines Corporation
b75a7d8f
A
5#* and others. All Rights Reserved.
6#**********************************************************************
7# nmake file for creating data files on win32
8# invoke with
9# nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release]
10#
11# 12/10/1999 weiv Created
12
13#If no config, we default to debug
14!IF "$(CFG)" == ""
15CFG=Debug
16!MESSAGE No configuration specified. Defaulting to common - Win32 Debug.
17!ENDIF
18
19#Here we test if a valid configuration is given
729e4ab9 20!IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug" && "$(CFG)" != "x86\Release" && "$(CFG)" != "x86\Debug" && "$(CFG)" != "x64\Release" && "$(CFG)" != "x64\Debug"
b75a7d8f
A
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:
24!MESSAGE
25!MESSAGE NMAKE /f "makedata.mak" CFG="Debug"
26!MESSAGE
27!MESSAGE Possible choices for configuration are:
28!MESSAGE
29!MESSAGE "Release"
30!MESSAGE "Debug"
31!MESSAGE
32!ERROR An invalid configuration is specified.
33!ENDIF
34
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
37!IF "$(ICUP)"==""
38!ERROR Can't find path!
39!ENDIF
40!MESSAGE ICU path is $(ICUP)
41RESNAME=uconvmsg
374ca955 42RESDIR=resources
b75a7d8f
A
43RESFILES=resfiles.mk
44ICUDATA=$(ICUP)\data
45
46DLL_OUTPUT=.\$(CFG)
47# set the following to 'static' or 'dll' depending
48PKGMODE=static
49
b75a7d8f
A
50ICD=$(ICUDATA)^\
51DATA_PATH=$(ICUP)\data^\
b75a7d8f 52
729e4ab9
A
53!IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug"
54ICUTOOLS=$(ICUP)\bin64
55PATH = $(ICUP)\bin64;$(PATH)
56!ELSE
57ICUTOOLS=$(ICUP)\bin
374ca955 58PATH = $(ICUP)\bin;$(PATH)
729e4ab9 59!ENDIF
b75a7d8f
A
60
61# Suffixes for data files
62.SUFFIXES : .ucm .cnv .dll .dat .res .txt .c
63
64# We're including a list of resource files.
374ca955 65FILESEPCHAR=
b75a7d8f
A
66
67!IF EXISTS("$(RESFILES)")
68!INCLUDE "$(RESFILES)"
69!ELSE
70!ERROR ERROR: cannot find "$(RESFILES)"
71!ENDIF
46f4442e
A
72RES_FILES = $(RESSRC:.txt=.res)
73RB_FILES = resources\$(RES_FILES:.res =.res resources\)
374ca955 74RESOURCESDIR=
b75a7d8f
A
75
76# This target should build all the data files
77!IF "$(PKGMODE)" == "dll"
78OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll"
79!ELSE
80OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib"
81!ENDIF
82
374ca955 83ALL : $(OUTPUT)
b75a7d8f
A
84 @echo All targets are up to date (mode $(PKGMODE))
85
86
87# invoke pkgdata - static
374ca955 88"$(DLL_OUTPUT)\$(RESNAME).lib" : $(RB_FILES) $(RESFILES)
b75a7d8f 89 @echo Building $(RESNAME).lib
374ca955 90 @"$(ICUTOOLS)\pkgdata" -f -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <<pkgdatain.txt
46f4442e 91$(RES_FILES:.res =.res
b75a7d8f
A
92)
93<<KEEP
94
b75a7d8f
A
95# This is to remove all the data files
96CLEAN :
b75a7d8f 97 -@erase "$(RB_FILES)"
374ca955
A
98 -@erase "$(CFG)\*uconvmsg*.*"
99 -@"$(ICUTOOLS)\pkgdata" -f --clean -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" pkgdatain.txt
b75a7d8f
A
100
101# Inference rule for creating resource bundles
374ca955 102{$(RESDIR)}.txt{$(RESDIR)}.res:
b75a7d8f 103 @echo Making Resource Bundle files
374ca955 104 "$(ICUTOOLS)\genrb" -s $(@D) -d $(@D) $(?F)
b75a7d8f
A
105
106
107$(RESSRC) : {"$(ICUTOOLS)"}genrb.exe
374ca955 108