1!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
2MACHINE = ix86
3!else if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
4MACHINE = alpha
5!else  #Assume win9x
6MACHINE = ix86
7!endif
8LIBS= libcmt.lib kernel32.lib
9
10all: tcshfr.dll tcshc.dll tcshde.dll tcshsp.dll tcshja.dll tcsh-it.dll
11
12stubdll.obj:stubdll.c
13	cl -W3 -MT -c  stubdll.c
14
15tcshgr.dll: tcshgr.res stubdll.obj
16	link -machine:$(MACHINE) -nodefaultlib $(LIBS) tcshgr.res stubdll.obj \
17	-out:tcshgr.dll
18
19tcshfr.dll: tcshfr.res stubdll.obj
20	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcshfr.res stubdll.obj \
21	-out:tcshfr.dll
22
23tcshde.dll: tcshde.res stubdll.obj
24	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcshde.res stubdll.obj \
25	-out:tcshde.dll
26
27tcshsp.dll: tcshsp.res stubdll.obj
28	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcshsp.res stubdll.obj \
29	-out:tcshsp.dll
30
31tcsh-it.dll: tcsh-it.res stubdll.obj
32	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcsh-it.res stubdll.obj\
33	-out:tcsh-it.dll
34
35tcshja.dll: tcshja.res stubdll.obj
36	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcshja.res stubdll.obj \
37	-out:tcshja.dll
38
39tcshc.dll: tcshc.res stubdll.obj
40	link -machine:$(MACHINE) -dll -nodefaultlib $(LIBS) tcshc.res stubdll.obj \
41	-out:tcshc.dll
42
43test.exe: test.obj
44	link test.obj user32.lib -out:test.exe
45clean:
46	-del *.obj *.res
47
48cleanall: clean
49	-del *.dll *.exe
50