1 #############################################################################
3 # SciTech Multi-platform Graphics Library
5 # ========================================================================
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
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.
17 # The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
19 # The Initial Developer of the Original Code is SciTech Software, Inc.
20 # All Rights Reserved.
22 # ========================================================================
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
30 #############################################################################
32 # Take out PMLIB if we don't need to link with it
40 # Implicit rule generation to build VxD's
43 $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
44 @$(VTOOLSD)\bin\segalias.exe -p $(VTOOLSD)\include\default.seg $@
47 $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
48 @$(VTOOLSD)\bin\segalias.exe -p $(VTOOLSD)\include\default.seg $@
50 %$O: %$A ; $(AS) @$(mktmp $(ASFLAGS:s/\/\\)) $(<:s,/,\)
52 %$L: ; $(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
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)
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
65 $(NMSYM) /TRANS:source,package /SOURCE:$(VXDSOURCE) $*.smf
67 @$(RM) -S $(mktmp $*.pel)
71 # Implicit generation rules for making object files, libraries and exe's
73 %$O: %.c ; $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
74 %$O: %$P ; $(CC) @$(mktmp $(CFLAGS:s/\/\\)) -c $(<:s,/,\)
76 %$O: %$A ; $(AS) @$(mktmp -o $@ $(ASFLAGS:s/\/\\)) $(<:s,/,\)
78 %$O: %$A ; $(AS) @$(mktmp $(ASFLAGS:s/\/\\)) $(<:s,/,\)
81 # Implicit rule for building resource files
82 %$R: %.rc ; $(RC) $(RCFLAGS) -r $<
84 # Implicit rule for building a DLL using a response file
88 %$D: ; $(LD) $(mktmp $(LDFLAGS) -Tpd -aa $(&:s/\/\\)\n$@\n$*.map\n$(EXELIBS)\n$*.def)
92 $(LD) $(mktmp $(LDFLAGS) -Tpd -aa c0d32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
95 $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
102 # Implicit rule for building a library file using response file
106 $(ILIB) $(ILIBFLAGS) $@ $?
110 $(ILIB) $(ILIBFLAGS) $@ $?
114 $(LIB) $(LIBFLAGS) $@ @$(mktmp +$(&:t" &\n+")\n)
117 # Implicit rule for building an executable file using response file
122 $(LD) $(mktmp $(LDFLAGS) -Tpe -aa $(WIN_VERSION) c0w32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
125 $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
131 $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS:s/\/\\) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
133 $(NMSYM) $(NMSYMFLAGS);$(SI_SOURCE) $@
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)
144 @$(RM) -S $(mktmp $*.def)
146 %$E: ; $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)
148 %$E: ; $(LD) $(mktmp $(LDFLAGS) -Tpe -ap c0x32.obj+\n$(&:s/\/\\)\n$@\n$*.map\n$(DEF_LIBS) $(PMLIB:s/\/\\) $(EXELIBS)\n$*.def)