comparison nt/makefile.def @ 11937:51cb98d13316

(ARCH): New definition. (CPU,CONFIG_H,OS_TYPE): Defined. (INCLUDE,LIB): Checked if valid. (ntwin32.mak): Included. (AR,CC,LINK): New definition. (ADVAPI32,libc,BASE_LIBS): Defined. (SYS_LDFLAGS): New definition. Update comments and preprocessor conditionals. (SYS_LIB_DIR,SYS_INC_DIR): Undefined.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 26 May 1995 05:10:24 +0000
parents 1877e9736ea1
children 268be0c80ca2
comparison
equal deleted inserted replaced
11936:b791b82792de 11937:51cb98d13316
19 19
20 # 20 #
21 # BEGIN CONFIGURATION 21 # BEGIN CONFIGURATION
22 # 22 #
23 23
24 # Set INSTALL_DIR to be the directory into which you want emacs installed.
24 # 25 #
25 # Set ARCH to the architecture on which you're building (i386, mips, alpha). 26 !ifndef INSTALL_DIR
26 # Set SYS_INC_DIR and SYS_LIB_DIR to your system include and library dirs. 27 INSTALL_DIR = C:\emacs
27 # 28 !endif
28
29 ARCH = mips
30 SYS_INC_DIR = C:\mstools\h
31 SYS_LIB_DIR = C:\mstools\lib
32
33 # Set this to be the directory into which you want emacs installed
34 INSTALL_DIR = C:\emacs
35
36 # May need to be cl386.exe when using the SDK on an x86.
37 CC = cl.exe
38
39 # May need to be lib32.exe on NT 3.1, lib.exe on NT 3.5
40 AR = lib32.exe
41
42 MAKE = nmake.exe
43 LINK = link32.exe
44
45 # If you are using VC 2.0, define COMPAT_LIB (only tested on i386)
46 #COMPAT_LIB = $(SYS_LIB_DIR)\oldnames.lib
47
48 CVTRES = cvtres.exe
49 29
50 # 30 #
51 # END CONFIGURATION 31 # END CONFIGURATION
52 # 32 #
53 # You shouldn't have to change any of the below to get emacs to build and 33
54 # install on your system. If you did have to make changes, let me know. 34 # Check that the INCLUDE and LIB environment variables are set.
55 # 35 #
36 !ifndef INCLUDE
37 !error The INCLUDE environment variable needs to be set.
38 !endif
39 !ifndef LIB
40 !error The LIB environment variable needs to be set.
41 !endif
56 42
57 INC = -I. -I$(SYS_INC_DIR) -I$(SYS_INC_DIR)\crt 43 # Determine the architecture we're running on.
44 # Define ARCH for our purposes;
45 # Define CPU for use by ntwin32.mak;
46 # Define CONFIG_H to the appropriate config.h for the system;
47 #
48 !ifdef PROCESSOR_ARCHITECTURE
49 # We're on Windows NT
50 CPU = $(PROCESSOR_ARCHITECTURE)
51 CONFIG_H = config.nt
52 OS_TYPE = winnt
53 ! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
54 ARCH = i386
55 CPU = i386
56 ! else
57 ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
58 ARCH = mips
59 ! else
60 ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
61 ARCH = alpha
62 ! else
63 ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
64 ARCH = ppc
65 ! else
66 !error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
67 ! endif
68 ! endif
69 ! endif
70 ! endif
71 !else
72 # We're on Windows 95
73 ARCH = i386
74 CPU = i386
75 CONFIG_H = config.w95
76 OS_TYPE = win95
77 !endif
78
79 # Include ntwin32.mak. So far, this file seems to be supported by every
80 # Microsoft compiler on NT and Win95 and properly defines the executable
81 # names and libraries necessary to build Emacs. I do not have access
82 # to any other vendor compilers, so I do not know if they supply this
83 # file, too. For now I'll assume that they do.
84 #
85 !include <ntwin32.mak>
86
87 # Using cvtres is necessary on NT 3.10 and doesn't hurt on later platforms.
88 CVTRES = cvtres.exe
89 AR = $(implib)
90 # The assignment $(CC) = $(cc) fails even though variables are case sensitive.
91 LINK_TMP = $(link)
92 LINK = $(LINK_TMP)
93 CC_TMP = $(cc)
94 CC = $(CC_TMP)
95
96 # advapi32.lib is left off of $(baselibs) on NT 3.10
97 !if "$(baselibs)" == "kernel32.lib "
98 ADVAPI32 = advapi32.lib
99 !else
100 ADVAPI32 =
101 !endif
102
103 # Older ntwin32.mak files do not define libc; do it for them.
104 !ifndef libc
105 libc = libc.lib
106 !endif
107
108 # The base libraries for compiling Emacs on NT. With MSVC, this should
109 # include oldnames.lib.
110 BASE_LIBS = $(libc) $(baselibs)
111
112 # We want any debugging info in the executable.
113 !if "$(LINK)" == "link32"
114 SYS_LDFLAGS =
115 !else
116 SYS_LDFLAGS = -pdb:none -release -incremental:no
117 !endif
118
119 INC = -I.
58 CFLAGS = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH) 120 CFLAGS = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH)
59 121
60 OBJDIR = obj 122 OBJDIR = obj
61 $(OBJDIR):; -mkdir $(OBJDIR) 123 $(OBJDIR):; -mkdir $(OBJDIR)
62 BLD = $(OBJDIR)\$(ARCH) 124 BLD = $(OBJDIR)\$(ARCH)
63 $(BLD): $(OBJDIR) 125 $(BLD): $(OBJDIR)
64 -mkdir $(BLD) 126 -mkdir $(BLD)
65 127
66 CP = copy 128 CP = copy
67 CP_DIR = xcopy /fried 129 CP_DIR = xcopy /fried
68 130
69 # This is completely braindamaged, but it's the only routine known to be there 131 # This is completely braindamaged, but it's the only routine known to be there
70 DEL_TREE = echo y | rmdir /s 132 DEL_TREE = echo y | rmdir /s
71 133
72 !IF "$(ARCH)" == "i386" 134 !if "$(ARCH)" == "i386"
73 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od 135 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od
74 ARCH_LDFLAGS = -align:0x1000 136 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
75 137
76 !ELSE 138 !else
77 !IF "$(ARCH)" == "mips" 139 !if "$(ARCH)" == "mips"
78 CC = mcl.exe 140 ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
79 ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 -D__stdcall= -D__cdecl= 141 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
80 ARCH_LDFLAGS = -align:0x1000
81 142
82 !ELSE 143 !else
83 !IF "$(ARCH)" == "alpha" 144 !if "$(ARCH)" == "alpha"
84 CC = claxp.exe
85 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -D__stdcall= -D__cdecl= 145 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -D__stdcall= -D__cdecl=
86 ARCH_LDFLAGS = -align:0x2000 146 ARCH_LDFLAGS = -align:0x2000 $(SYS_LDFLAGS)
87 147
88 !ELSE 148 !else
89 !ERROR Unknown architecture type. 149 !if "$(ARCH)" == "ppc"
90 !ENDIF 150 # These flags are a guess...if they don't work, please send me mail.
91 !ENDIF 151 ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
92 !ENDIF 152 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
153
154 !else
155 !ERROR Unknown architecture type "$(ARCH)".
156 !endif
157 !endif
158 !endif
159 !endif