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