Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #********************************************************************** |
michael@0 | 2 | #* Copyright (C) 1999-2008, International Business Machines Corporation |
michael@0 | 3 | #* and others. All Rights Reserved. |
michael@0 | 4 | #********************************************************************** |
michael@0 | 5 | # nmake file for creating data files on win32 |
michael@0 | 6 | # invoke with |
michael@0 | 7 | # nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release] |
michael@0 | 8 | # |
michael@0 | 9 | # 12/10/1999 weiv Created |
michael@0 | 10 | |
michael@0 | 11 | #If no config, we default to debug |
michael@0 | 12 | !IF "$(CFG)" == "" |
michael@0 | 13 | CFG=Debug |
michael@0 | 14 | !MESSAGE No configuration specified. Defaulting to common - Win32 Debug. |
michael@0 | 15 | !ENDIF |
michael@0 | 16 | |
michael@0 | 17 | #Here we test if a valid configuration is given |
michael@0 | 18 | !IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug" && "$(CFG)" != "x86\Release" && "$(CFG)" != "x86\Debug" && "$(CFG)" != "x64\Release" && "$(CFG)" != "x64\Debug" |
michael@0 | 19 | !MESSAGE Invalid configuration "$(CFG)" specified. |
michael@0 | 20 | !MESSAGE You can specify a configuration when running NMAKE |
michael@0 | 21 | !MESSAGE by defining the macro CFG on the command line. For example: |
michael@0 | 22 | !MESSAGE |
michael@0 | 23 | !MESSAGE NMAKE /f "makedata.mak" CFG="Debug" |
michael@0 | 24 | !MESSAGE |
michael@0 | 25 | !MESSAGE Possible choices for configuration are: |
michael@0 | 26 | !MESSAGE |
michael@0 | 27 | !MESSAGE "Release" |
michael@0 | 28 | !MESSAGE "Debug" |
michael@0 | 29 | !MESSAGE |
michael@0 | 30 | !ERROR An invalid configuration is specified. |
michael@0 | 31 | !ENDIF |
michael@0 | 32 | |
michael@0 | 33 | #Let's see if user has given us a path to ICU |
michael@0 | 34 | #This could be found according to the path to makefile, but for now it is this way |
michael@0 | 35 | !IF "$(ICUP)"=="" |
michael@0 | 36 | !ERROR Can't find path! |
michael@0 | 37 | !ENDIF |
michael@0 | 38 | !MESSAGE ICU path is $(ICUP) |
michael@0 | 39 | RESNAME=uconvmsg |
michael@0 | 40 | RESDIR=resources |
michael@0 | 41 | RESFILES=resfiles.mk |
michael@0 | 42 | ICUDATA=$(ICUP)\data |
michael@0 | 43 | |
michael@0 | 44 | DLL_OUTPUT=.\$(CFG) |
michael@0 | 45 | # set the following to 'static' or 'dll' depending |
michael@0 | 46 | PKGMODE=static |
michael@0 | 47 | |
michael@0 | 48 | ICD=$(ICUDATA)^\ |
michael@0 | 49 | DATA_PATH=$(ICUP)\data^\ |
michael@0 | 50 | |
michael@0 | 51 | !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" |
michael@0 | 52 | ICUTOOLS=$(ICUP)\bin64 |
michael@0 | 53 | PATH = $(ICUP)\bin64;$(PATH) |
michael@0 | 54 | !ELSE |
michael@0 | 55 | ICUTOOLS=$(ICUP)\bin |
michael@0 | 56 | PATH = $(ICUP)\bin;$(PATH) |
michael@0 | 57 | !ENDIF |
michael@0 | 58 | |
michael@0 | 59 | # Suffixes for data files |
michael@0 | 60 | .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c |
michael@0 | 61 | |
michael@0 | 62 | # We're including a list of resource files. |
michael@0 | 63 | FILESEPCHAR= |
michael@0 | 64 | |
michael@0 | 65 | !IF EXISTS("$(RESFILES)") |
michael@0 | 66 | !INCLUDE "$(RESFILES)" |
michael@0 | 67 | !ELSE |
michael@0 | 68 | !ERROR ERROR: cannot find "$(RESFILES)" |
michael@0 | 69 | !ENDIF |
michael@0 | 70 | RES_FILES = $(RESSRC:.txt=.res) |
michael@0 | 71 | RB_FILES = resources\$(RES_FILES:.res =.res resources\) |
michael@0 | 72 | RESOURCESDIR= |
michael@0 | 73 | |
michael@0 | 74 | # This target should build all the data files |
michael@0 | 75 | !IF "$(PKGMODE)" == "dll" |
michael@0 | 76 | OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll" |
michael@0 | 77 | !ELSE |
michael@0 | 78 | OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib" |
michael@0 | 79 | !ENDIF |
michael@0 | 80 | |
michael@0 | 81 | ALL : $(OUTPUT) |
michael@0 | 82 | @echo All targets are up to date (mode $(PKGMODE)) |
michael@0 | 83 | |
michael@0 | 84 | |
michael@0 | 85 | # invoke pkgdata - static |
michael@0 | 86 | "$(DLL_OUTPUT)\$(RESNAME).lib" : $(RB_FILES) $(RESFILES) |
michael@0 | 87 | @echo Building $(RESNAME).lib |
michael@0 | 88 | @"$(ICUTOOLS)\pkgdata" -f -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <<pkgdatain.txt |
michael@0 | 89 | $(RES_FILES:.res =.res |
michael@0 | 90 | ) |
michael@0 | 91 | <<KEEP |
michael@0 | 92 | |
michael@0 | 93 | # This is to remove all the data files |
michael@0 | 94 | CLEAN : |
michael@0 | 95 | -@erase "$(RB_FILES)" |
michael@0 | 96 | -@erase "$(CFG)\*uconvmsg*.*" |
michael@0 | 97 | -@"$(ICUTOOLS)\pkgdata" -f --clean -v -m static -c -p $(RESNAME) -d "$(DLL_OUTPUT)" -s "$(RESDIR)" pkgdatain.txt |
michael@0 | 98 | |
michael@0 | 99 | # Inference rule for creating resource bundles |
michael@0 | 100 | {$(RESDIR)}.txt{$(RESDIR)}.res: |
michael@0 | 101 | @echo Making Resource Bundle files |
michael@0 | 102 | "$(ICUTOOLS)\genrb" -s $(@D) -d $(@D) $(?F) |
michael@0 | 103 | |
michael@0 | 104 | |
michael@0 | 105 | $(RESSRC) : {"$(ICUTOOLS)"}genrb.exe |
michael@0 | 106 |