michael@0: #********************************************************************** michael@0: #* Copyright (C) 1999-2008, International Business Machines Corporation michael@0: #* and others. All Rights Reserved. michael@0: #********************************************************************** michael@0: # nmake file for creating data files on win32 michael@0: # invoke with michael@0: # nmake /f makedata.mak icup= [Debug|Release] michael@0: # michael@0: # 12/10/1999 weiv Created michael@0: michael@0: #If no config, we default to debug michael@0: !IF "$(CFG)" == "" michael@0: CFG=Debug michael@0: !MESSAGE No configuration specified. Defaulting to common - Win32 Debug. michael@0: !ENDIF michael@0: michael@0: #Here we test if a valid configuration is given michael@0: !IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug" && "$(CFG)" != "x86\Release" && "$(CFG)" != "x86\Debug" && "$(CFG)" != "x64\Release" && "$(CFG)" != "x64\Debug" michael@0: !MESSAGE Invalid configuration "$(CFG)" specified. michael@0: !MESSAGE You can specify a configuration when running NMAKE michael@0: !MESSAGE by defining the macro CFG on the command line. For example: michael@0: !MESSAGE michael@0: !MESSAGE NMAKE /f "makedata.mak" CFG="Debug" michael@0: !MESSAGE michael@0: !MESSAGE Possible choices for configuration are: michael@0: !MESSAGE michael@0: !MESSAGE "Release" michael@0: !MESSAGE "Debug" michael@0: !MESSAGE michael@0: !ERROR An invalid configuration is specified. michael@0: !ENDIF michael@0: michael@0: #Let's see if user has given us a path to ICU michael@0: #This could be found according to the path to makefile, but for now it is this way michael@0: !IF "$(ICUP)"=="" michael@0: !ERROR Can't find path! michael@0: !ENDIF michael@0: !MESSAGE ICU path is $(ICUP) michael@0: RESNAME=uconvmsg michael@0: RESDIR=resources michael@0: RESFILES=resfiles.mk michael@0: ICUDATA=$(ICUP)\data michael@0: michael@0: DLL_OUTPUT=.\$(CFG) michael@0: # set the following to 'static' or 'dll' depending michael@0: PKGMODE=static michael@0: michael@0: ICD=$(ICUDATA)^\ michael@0: DATA_PATH=$(ICUP)\data^\ michael@0: michael@0: !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" michael@0: ICUTOOLS=$(ICUP)\bin64 michael@0: PATH = $(ICUP)\bin64;$(PATH) michael@0: !ELSE michael@0: ICUTOOLS=$(ICUP)\bin michael@0: PATH = $(ICUP)\bin;$(PATH) michael@0: !ENDIF michael@0: michael@0: # Suffixes for data files michael@0: .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c michael@0: michael@0: # We're including a list of resource files. michael@0: FILESEPCHAR= michael@0: michael@0: !IF EXISTS("$(RESFILES)") michael@0: !INCLUDE "$(RESFILES)" michael@0: !ELSE michael@0: !ERROR ERROR: cannot find "$(RESFILES)" michael@0: !ENDIF michael@0: RES_FILES = $(RESSRC:.txt=.res) michael@0: RB_FILES = resources\$(RES_FILES:.res =.res resources\) michael@0: RESOURCESDIR= michael@0: michael@0: # This target should build all the data files michael@0: !IF "$(PKGMODE)" == "dll" michael@0: OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll" michael@0: !ELSE michael@0: OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib" michael@0: !ENDIF michael@0: michael@0: ALL : $(OUTPUT) michael@0: @echo All targets are up to date (mode $(PKGMODE)) michael@0: michael@0: michael@0: # invoke pkgdata - static michael@0: "$(DLL_OUTPUT)\$(RESNAME).lib" : $(RB_FILES) $(RESFILES) michael@0: @echo Building $(RESNAME).lib michael@0: @"$(ICUTOOLS)\pkgdata" -f -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <