1 | # The contents of this file are subject to the Netscape Public |
---|
2 | # License Version 1.1 (the "License"); you may not use this file |
---|
3 | # except in compliance with the License. You may obtain a copy of |
---|
4 | # the License at http://www.mozilla.org/NPL/ |
---|
5 | # |
---|
6 | # Software distributed under the License is distributed on an "AS |
---|
7 | # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
---|
8 | # implied. See the License for the specific language governing |
---|
9 | # rights and limitations under the License. |
---|
10 | # |
---|
11 | # The Original Code is mozilla.org code. |
---|
12 | # |
---|
13 | # The Initial Developer of the Original Code is Netscape |
---|
14 | # Communications Corporation. Portions created by Netscape are |
---|
15 | # Copyright (C) 1998 Netscape Communications Corporation. All |
---|
16 | # Rights Reserved. |
---|
17 | # |
---|
18 | # Contributor(s): |
---|
19 | |
---|
20 | !if !defined(VERBOSE) |
---|
21 | .SILENT: |
---|
22 | !endif |
---|
23 | #//------------------------------------------------------------------------ |
---|
24 | #// |
---|
25 | #// This makefile contains all of the rules necessary to build 16 and 32 bit |
---|
26 | #// executables. |
---|
27 | #// |
---|
28 | #//------------------------------------------------------------------------ |
---|
29 | !if defined(PROGRAM) && !defined(CONFIG_EXE_INC) |
---|
30 | CONFIG_EXE_INC=1 |
---|
31 | |
---|
32 | |
---|
33 | !if "$(MOZ_BITS)" == "16" |
---|
34 | #//------------------------------------------------------------------------ |
---|
35 | #// |
---|
36 | #// Rule to build a 16-bit executable using the PROGRAM target |
---|
37 | #// |
---|
38 | #//------------------------------------------------------------------------ |
---|
39 | $(PROGRAM):: $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(MISCDEP) makefile.win $(DEPTH)\config\exe.inc |
---|
40 | echo +++ make: Creating EXE: $@ |
---|
41 | # // |
---|
42 | # // create response file for the command. The format is: |
---|
43 | # // Object files, Output file, Map file, Libraries, DEF file, RES file |
---|
44 | # // |
---|
45 | echo $(LFLAGS) > $(CFGFILE) |
---|
46 | for %%d in ($(OBJS)) do echo %%d + >> $(CFGFILE) |
---|
47 | echo. >> $(CFGFILE) |
---|
48 | echo $(OBJDIR)\$(*B).exe, >> $(CFGFILE) |
---|
49 | echo $(MAPFILE), >> $(CFGFILE) |
---|
50 | echo $(LLIBS) $(WIN_LIBS) $(OS_LIBS)>> $(CFGFILE) |
---|
51 | !ifdef DEFFILE |
---|
52 | echo $(DEFFILE), >> $(CFGFILE) |
---|
53 | !else |
---|
54 | echo. >> $(CFGFILE) |
---|
55 | !endif |
---|
56 | !ifdef RESFILE |
---|
57 | echo $(RESFILE), >> $(CFGFILE) |
---|
58 | !else |
---|
59 | echo. >> $(CFGFILE) |
---|
60 | !endif |
---|
61 | # // |
---|
62 | # // execute the command |
---|
63 | # // |
---|
64 | $(LD) /ST:8192 @$(CFGFILE) |
---|
65 | |
---|
66 | !else |
---|
67 | #//------------------------------------------------------------------------ |
---|
68 | #// |
---|
69 | #// Rule to build a 32-bit executable using the PROGRAM target |
---|
70 | #// |
---|
71 | #//------------------------------------------------------------------------ |
---|
72 | $(PROGRAM):: $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(EXTRA_LIBS_LIST_FILE) $(MISCDEP) makefile.win $(DEPTH)\config\exe.inc |
---|
73 | echo +++ make: Creating EXE: $@ |
---|
74 | cat << $(EXTRA_LIBS_LIST_FILE) << >$(CFGFILE) |
---|
75 | /NOLOGO /OUT:$@ /PDB:$(PDBFILE) |
---|
76 | !ifdef DEFFILE |
---|
77 | /DEF:$(DEFFILE) |
---|
78 | !endif |
---|
79 | !ifdef MAPFILE |
---|
80 | /MAP:$(MAPFILE) |
---|
81 | !endif |
---|
82 | $(LFLAGS) |
---|
83 | $(OBJS) |
---|
84 | $(RESFILE) |
---|
85 | <<NOKEEP |
---|
86 | $(LLIBS) $(WIN_LIBS) $(OS_LIBS) |
---|
87 | <<NOKEEP |
---|
88 | $(LD) @$(CFGFILE) |
---|
89 | !endif |
---|
90 | |
---|
91 | !endif # PROGRAM && ! CONFIG_EXE_INC |
---|