]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/MAI/bios_emulator/scitech/makedefs/rules/bc32.mk
* Patch by Thomas Frieden, 13 Nov 2002:
[karo-tx-uboot.git] / board / MAI / bios_emulator / scitech / makedefs / rules / bc32.mk
1 #############################################################################
2 #
3 #                                       SciTech Multi-platform Graphics Library
4 #
5 #  ========================================================================
6 #
7 #    The contents of this file are subject to the SciTech MGL Public
8 #    License Version 1.0 (the "License"); you may not use this file
9 #    except in compliance with the License. You may obtain a copy of
10 #    the License at http://www.scitechsoft.com/mgl-license.txt
11 #
12 #    Software distributed under the License is distributed on an
13 #    "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14 #    implied. See the License for the specific language governing
15 #    rights and limitations under the License.
16 #
17 #    The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
18 #
19 #    The Initial Developer of the Original Code is SciTech Software, Inc.
20 #    All Rights Reserved.
21 #
22 #  ========================================================================
23 #
24 # Descripton:   Rules makefile definitions, which define the rules used to
25 #                               build targets. We include them here at the end of the
26 #                               makefile so the generic project makefiles can override
27 #                               certain things with macros (such as linking C++ programs
28 #                               differently).
29 #
30 #############################################################################
31
32 # Take out PMLIB if we don't need to link with it
33
34 .IF $(NO_PMLIB)
35 PMLIB :=
36 .ENDIF
37
38 .IF $(USE_VXD)
39
40 # Implicit rule generation to build VxD's
41
42 %$O: %.c ;
43         $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
44         @$(VTOOLSD)\bin\segalias.exe -p $(VTOOLSD)\include\default.seg $@
45
46 %$O: %$P ;
47         $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
48         @$(VTOOLSD)\bin\segalias.exe -p $(VTOOLSD)\include\default.seg $@
49
50 %$O: %$A ; $(AS) @$(mktmp $(ASFLAGS:s/\/\\)) $(<:s,/,\)
51
52 %$L: ; $(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
53
54 %.dll: ;
55         @$(CP) $(mktmp EXPORTS\n_The_DDB @1) $*.def
56         tlink32.exe @$(mktmp $(LDFLAGS) -Tpd $(VTOOLSD:s/\/\\)\lib\icrtbc4.obj+\n$(&:s/\/\\)\n$*.dll\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS:s/\/\\)\n$*.def)
57         @$(RM) -S $(mktmp $*.def)
58
59 %.vxd: %.dll ;
60         @$(CP) $(mktmp DYNAMIC\nATTRIB ICODE INIT\nATTRIB LCODE LOCKED\nATTRIB PCODE PAGEABLE\nATTRIB SCODE STATIC\nATTRIB DBOCODE DEBUG\nMERGE ICODE INITDAT0 INITDATA) $*.pel
61         @$(VTOOLSD)\bin\vxdver.exe $*.vrc $*.res
62         @$(VTOOLSD)\bin\pele.exe -d -s $*.smf -c $*.pel -o $@ -k 400 $*.dll
63         @$(VTOOLSD)\bin\sethdr.exe -n $* -x $@ -r $*.res
64 .IF $(DBG)
65         $(NMSYM) /TRANS:source,package /SOURCE:$(VXDSOURCE) $*.smf
66 .ENDIF
67         @$(RM) -S $(mktmp $*.pel)
68
69 .ELSE
70
71 # Implicit generation rules for making object files, libraries and exe's
72
73 %$O: %.c ; $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
74 %$O: %$P ; $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
75 .IF $(USE_NASM)
76 %$O: %$A ; $(AS) @$(mktmp -o $@ $(ASFLAGS:s/\/\\)) $(<:s,/,\)
77 .ELSE
78 %$O: %$A ; $(AS) @$(mktmp $(ASFLAGS:s/\/\\)) $(<:s,/,\)
79 .ENDIF
80
81 # Implicit rule for building resource files
82 %$R: %.rc ; $(RC) $(RCFLAGS) -r $<
83
84 # Implicit rule for building a DLL using a response file
85 .IF $(IMPORT_DLL)
86 .ELSE
87 .IF $(NO_RUNTIME)
88 %$D: ; $(LD) $(mktmp $(LDFLAGS) -Tpd -aa $(&:s/\/\\)\n$@\n$*.map\n$(EXELIBS)\n$*.def)
89 .ELSE
90 %$D: ;
91         makedef $(@:b)
92         $(LD) $(mktmp $(LDFLAGS) -Tpd -aa c0d32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
93 .IF $(DBG)
94 .IF $(USE_SOFTICE)
95         $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
96         tdstrp32 $@
97 .ENDIF
98 .ENDIF
99 .ENDIF
100 .ENDIF
101
102 # Implicit rule for building a library file using response file
103 .IF $(BUILD_DLL)
104 %$L: ;
105     @$(RM) $@
106     $(ILIB) $(ILIBFLAGS) $@ $?
107 .ELIF $(IMPORT_DLL)
108 %$L: ;
109     @$(RM) $@
110     $(ILIB) $(ILIBFLAGS) $@ $?
111 .ELSE
112 %$L: ;
113     @$(RM) $@
114     $(LIB) $(LIBFLAGS) $@ @$(mktmp +$(&:t" &\n+")\n)
115 .ENDIF
116
117 # Implicit rule for building an executable file using response file
118
119 .IF $(USE_WIN32)
120 .IF $(WIN32_GUI)
121 %$E: ;
122         $(LD) $(mktmp $(LDFLAGS) -Tpe -aa $(WIN_VERSION) c0w32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
123 .IF $(DBG)
124 .IF $(USE_SOFTICE)
125         $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
126         tdstrp32 $@
127 .ENDIF
128 .ENDIF
129 .ELSE
130 %$E: ;
131         $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
132 .IF $(USE_SOFTICE)
133         $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
134         tdstrp32 $@
135 .ENDIF
136 .ENDIF
137 .ELIF $(USE_TNT)
138 %$E: ;
139         @$(CP) $(mktmp stub 'gotnt.exe') $*.def
140         @$(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
141 .IF $(DOSSTYLE)
142         @markphar $@
143 .ENDIF
144         @$(RM) -S $(mktmp $*.def)
145 .ELIF $(USE_SMX32)
146 %$E: ; $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
147 .ELSE
148 %$E: ; $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
149 .END
150
151 .ENDIF