|
|
1.1 root 1: ##############################################################################
2: #
3: # (c) Copyright Microsoft Corp. 1992-1993 All Rights Reserved
4: #
5: # File:
6: #
7: # makefile - makefile for spoly.exe
8: #
9: # Purpose:
10: #
11: # Builds the OLE 2.0 sample IDispatch server, spoly.exe.
12: #
13: #
14: # Usage:
15: #
16: # NMAKE ; build with defaults
17: # or: NMAKE option ; build with the given option(s)
18: # or: NMAKE clean ; erase all compiled files
19: #
20: # option: dev = [win16 | win32] ; dev=win16 is the default
21: #
22: #
23: # Notes:
24: #
25: # This makefile assumes that the PATH, INCLUDE and LIB environment
26: # variables are setup properly.
27: #
28: ##############################################################################
29:
30:
31:
32: ##########################################################################
33: #
34: # Default Settings
35: #
36:
37: !if "$(dev)" == ""
38: dev = win32
39: !endif
40:
41: !if !("$(dev)" == "win16" || "$(dev)" == "win32" || "$(dev)" == "mac")
42: !error Invalid dev option, choose from [win16 | win32 | mac]
43: !endif
44:
45: !if "$(dev)" == "win16"
46: TARGET = WIN16
47: !endif
48:
49: !if "$(dev)" == "win32"
50: TARGET = WIN32
51: MACHINE = i386
52: !endif
53:
54: !if "$(dev)" == "mac"
55: !error Mac build is currently not supported
56: !endif
57:
58:
59: ##########################################################################
60: #
61: # WIN16 Settings
62: #
63: !if "$(TARGET)" == "WIN16"
64:
65: CC = cl
66: LINK = link
67:
68: RCFLAGS = -dWIN16
69: CFLAGS = -W3 -AM -GA -GEs -DWIN16
70: LINKFLAGS = /NOD /NOI /BATCH /ONERROR:NOEXE
71:
72: LIBS = libw.lib mlibcew.lib
73:
74: CFLAGS = $(CFLAGS) -Od -Zi -D_DEBUG $(CL)
75: LINKFLAGS = $(LINKFLAGS) /COD
76:
77: !endif
78:
79:
80: ##########################################################################
81: #
82: # WIN32 Settings
83: #
84: !if "$(TARGET)" == "WIN32"
85:
86: CC = cl386
87: LINK = link32
88:
89: RCFLAGS = -dWIN32
90: CFLAGS = -W3 -G3 -nologo -D$(MACHINE)=1 -DWIN32 -D_NTWIN -D_WINDOWS $(CL)
91: CFLAGS = $(CFLAGS) -DOLE2SHIP -DOLE2FINAL -D_INC_OLE -D__RPC_H__ -D__RPCDCE_H__ -D_X86_ -DNTBETA2 -D_MT
92: LINKFLAGS = -subsystem:windows -entry:WinMainCRTStartup -machine:$(MACHINE)
93:
94: LIBS = libc.lib kernel32.lib user32.lib gdi32.lib
95:
96: CFLAGS = $(CFLAGS) -Od -Zi -D_DEBUG $(CL)
97: LINKFLAGS = -debug:full -debugtype:cv $(LINKFLAGS)
98:
99: !endif
100:
101:
102: ##########################################################################
103: #
104: # Application Settings
105: #
106:
107: !if "$(TARGET)" == "WIN16"
108: LIBS = ole2.lib compobj.lib ole2disp.lib ole2nls.lib $(LIBS)
109: !else
110: !if "$(TARGET)" == "WIN32"
111: LIBS = ole2w32.lib ole2di32.lib $(LIBS)
112: !endif
113: !endif
114:
115: OBJS = \
116: winmain.obj \
117: cpoly.obj \
118: cpoint.obj \
119: cenumpt.obj \
120: statbar.obj \
121: clsid.obj \
122: misc.obj
123:
124:
125: goal : setflags spoly.exe
126:
127: setflags :
128: set CL=$(CFLAGS)
129:
130: clean :
131: if exist *.obj del *.obj
132: if exist spoly.exe del spoly.exe
133: if exist spoly.map del spoly.map
134: if exist spoly.res del spoly.res
135: if exist spoly.rs del spoly.rs
136: if exist *.pdb del *.pdb
137:
138:
139: ##########################################################################
140: #
141: # Application Build (WIN16 Specific)
142: #
143:
144: !if "$(TARGET)" == "WIN16"
145:
146: spoly.exe : $(OBJS) spoly.def spoly.res spoly.ico
147: link $(LINKFLAGS) @<<
148: $(OBJS),
149: $@,,
150: $(LIBS),
151: spoly.def
152: <<
153: rc -k -t spoly.res $@
154: !endif
155:
156:
157: ##########################################################################
158: #
159: # Application Build (WIN32 Specific)
160: #
161: !if "$(TARGET)" == "WIN32"
162:
163: spoly.exe : $(OBJS) spoly.def spoly.res spoly.ico
164: cvtres -$(MACHINE) spoly.res -o spoly.rs
165: $(LINK) @<<
166: $(LINKFLAGS)
167: -out:$@
168: -map:$*.map
169: $(OBJS)
170: spoly.rs
171: $(LIBS)
172: <<
173: !endif
174:
175:
176: spoly.res : spoly.rc resource.h
177: rc $(RCFLAGS) -r -fo$@ spoly.rc
178:
179: winmain.obj: winmain.cpp hostenv.h resource.h spoly.h cpoint.h cpoly.h statbar.h
180: $(CC) -c winmain.cpp
181:
182: cpoint.obj: cpoint.cpp cpoint.h hostenv.h spoly.h statbar.h
183: $(CC) -c cpoint.cpp
184:
185: cpoly.obj: cpoly.cpp cpoint.h cpoly.h hostenv.h spoly.h statbar.h
186: $(CC) -c cpoly.cpp
187:
188: clsid.obj: clsid.c clsid.h
189: $(CC) -c clsid.c
190:
191: cenumpt.obj: cenumpt.cpp cenumpt.h
192: $(CC) -c cenumpt.cpp
193:
194: statbar.obj: statbar.cpp statbar.h
195: $(CC) -c statbar.cpp
196:
197: misc.obj: misc.cpp hostenv.h spoly.h
198: $(CC) -c misc.cpp
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.