2001-09-19 23:43:16 +00:00
|
|
|
#**********************************************************************
|
2003-12-23 19:23:42 +00:00
|
|
|
#* Copyright (C) 1999-2003, International Business Machines Corporation
|
2001-09-19 23:43:16 +00:00
|
|
|
#* and others. All Rights Reserved.
|
|
|
|
#**********************************************************************
|
|
|
|
# nmake file for creating data files on win32
|
|
|
|
# invoke with
|
|
|
|
# nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release]
|
|
|
|
#
|
|
|
|
# 12/10/1999 weiv Created
|
|
|
|
|
|
|
|
#If no config, we default to debug
|
|
|
|
!IF "$(CFG)" == ""
|
|
|
|
CFG=Debug
|
|
|
|
!MESSAGE No configuration specified. Defaulting to common - Win32 Debug.
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#Here we test if a valid configuration is given
|
|
|
|
!IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug"
|
|
|
|
!MESSAGE Invalid configuration "$(CFG)" specified.
|
|
|
|
!MESSAGE You can specify a configuration when running NMAKE
|
|
|
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
|
|
!MESSAGE
|
|
|
|
!MESSAGE NMAKE /f "makedata.mak" CFG="Debug"
|
|
|
|
!MESSAGE
|
|
|
|
!MESSAGE Possible choices for configuration are:
|
|
|
|
!MESSAGE
|
|
|
|
!MESSAGE "Release"
|
|
|
|
!MESSAGE "Debug"
|
|
|
|
!MESSAGE
|
|
|
|
!ERROR An invalid configuration is specified.
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#Let's see if user has given us a path to ICU
|
|
|
|
#This could be found according to the path to makefile, but for now it is this way
|
|
|
|
!IF "$(ICUP)"==""
|
|
|
|
!ERROR Can't find path!
|
|
|
|
!ENDIF
|
2002-03-19 17:14:49 +00:00
|
|
|
!MESSAGE ICU path is $(ICUP)
|
2001-09-19 23:43:16 +00:00
|
|
|
RESNAME=uconvmsg
|
2003-09-20 19:27:38 +00:00
|
|
|
RESDIR=.
|
2001-09-19 23:43:16 +00:00
|
|
|
RESFILES=resfiles.mk
|
|
|
|
ICUDATA=$(ICUP)\data
|
|
|
|
|
2001-12-03 20:27:42 +00:00
|
|
|
DLL_OUTPUT=.\$(CFG)
|
2002-03-15 02:12:01 +00:00
|
|
|
# set the following to 'static' or 'dll' depending
|
|
|
|
PKGMODE=static
|
|
|
|
|
2001-09-19 23:43:16 +00:00
|
|
|
|
|
|
|
ICD=$(ICUDATA)^\
|
|
|
|
DATA_PATH=$(ICUP)\data^\
|
2001-12-03 20:27:42 +00:00
|
|
|
ICUTOOLS=$(ICUP)\bin
|
2001-09-19 23:43:16 +00:00
|
|
|
|
|
|
|
PATH = $(PATH);$(ICUP)\bin
|
|
|
|
|
|
|
|
# Suffixes for data files
|
|
|
|
.SUFFIXES : .ucm .cnv .dll .dat .res .txt .c
|
|
|
|
|
2002-03-26 01:37:01 +00:00
|
|
|
# We're including a list of resource files.
|
2002-03-26 05:38:06 +00:00
|
|
|
FILESEPCHAR=\\
|
2002-03-26 01:37:01 +00:00
|
|
|
|
2001-09-19 23:43:16 +00:00
|
|
|
!IF EXISTS("$(RESFILES)")
|
|
|
|
!INCLUDE "$(RESFILES)"
|
|
|
|
!ELSE
|
|
|
|
!ERROR ERROR: cannot find "$(RESFILES)"
|
|
|
|
!ENDIF
|
|
|
|
RB_FILES = $(RESSRC:.txt=.res)
|
|
|
|
|
|
|
|
# This target should build all the data files
|
2002-03-15 02:12:01 +00:00
|
|
|
!IF "$(PKGMODE)" == "dll"
|
|
|
|
OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll"
|
|
|
|
!ELSE
|
|
|
|
OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib"
|
|
|
|
!ENDIF
|
|
|
|
|
2003-09-20 19:27:38 +00:00
|
|
|
ALL : $(OUTPUT)
|
2002-03-15 02:12:01 +00:00
|
|
|
@echo All targets are up to date (mode $(PKGMODE))
|
|
|
|
|
2001-09-19 23:43:16 +00:00
|
|
|
|
2002-03-15 02:12:01 +00:00
|
|
|
# invoke pkgdata - static
|
2003-09-20 19:27:38 +00:00
|
|
|
"$(DLL_OUTPUT)\$(RESNAME).lib" : $(RB_FILES) $(RESFILES)
|
2002-03-15 02:12:01 +00:00
|
|
|
@echo Building $(RESNAME).lib
|
2003-09-20 19:27:38 +00:00
|
|
|
@"$(ICUTOOLS)\pkgdata" -f -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <<pkgdatain.txt
|
2001-09-19 23:43:16 +00:00
|
|
|
$(RB_FILES:.res =.res
|
|
|
|
)
|
|
|
|
<<KEEP
|
|
|
|
|
|
|
|
# This is to remove all the data files
|
|
|
|
CLEAN :
|
2002-03-19 17:14:49 +00:00
|
|
|
-@erase "$(RB_FILES)"
|
2003-09-20 19:27:38 +00:00
|
|
|
-@erase "$(RESDIR)\uconvmsg*.*"
|
|
|
|
-@erase "$(CFG)\*uconvmsg*.*"
|
|
|
|
-@"$(ICUTOOLS)\pkgdata" -f --clean -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" pkgdatain.txt
|
2001-09-19 23:43:16 +00:00
|
|
|
|
|
|
|
# Inference rule for creating resource bundles
|
|
|
|
.txt.res:
|
|
|
|
@echo Making Resource Bundle files
|
2003-09-20 19:27:38 +00:00
|
|
|
"$(ICUTOOLS)\genrb" -t -p $(RESNAME) -s $(@D) -d $(@D) $(?F)
|
2001-09-19 23:43:16 +00:00
|
|
|
|
|
|
|
|
2001-12-03 20:27:42 +00:00
|
|
|
$(RESSRC) : {"$(ICUTOOLS)"}genrb.exe
|
2003-09-20 19:27:38 +00:00
|
|
|
|