aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Voelker1995-05-26 05:10:24 +0000
committerGeoff Voelker1995-05-26 05:10:24 +0000
commit43648015ac347a2dedfbe3638c41d0bcc3410cfe (patch)
tree128385984b36a5234f8e7e0ecb62a898f31d8a21
parentd392a4f1e5128b3a64a9a56ac3dec48645438b2c (diff)
downloademacs-43648015ac347a2dedfbe3638c41d0bcc3410cfe.tar.gz
emacs-43648015ac347a2dedfbe3638c41d0bcc3410cfe.zip
(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.
-rw-r--r--nt/makefile.def157
1 files changed, 112 insertions, 45 deletions
diff --git a/nt/makefile.def b/nt/makefile.def
index f1cfd80e6eb..ee7de6c2a81 100644
--- a/nt/makefile.def
+++ b/nt/makefile.def
@@ -21,44 +21,106 @@
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. 27INSTALL_DIR = C:\emacs
27# 28!endif
28
29ARCH = mips
30SYS_INC_DIR = C:\mstools\h
31SYS_LIB_DIR = C:\mstools\lib
32
33# Set this to be the directory into which you want emacs installed
34INSTALL_DIR = C:\emacs
35
36# May need to be cl386.exe when using the SDK on an x86.
37CC = cl.exe
38
39# May need to be lib32.exe on NT 3.1, lib.exe on NT 3.5
40AR = lib32.exe
41
42MAKE = nmake.exe
43LINK = 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
48CVTRES = 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.
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
42
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;
55# 47#
48!ifdef PROCESSOR_ARCHITECTURE
49# We're on Windows NT
50CPU = $(PROCESSOR_ARCHITECTURE)
51CONFIG_H = config.nt
52OS_TYPE = winnt
53! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
54ARCH = i386
55CPU = i386
56! else
57! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
58ARCH = mips
59! else
60! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
61ARCH = alpha
62! else
63! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
64ARCH = 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
73ARCH = i386
74CPU = i386
75CONFIG_H = config.w95
76OS_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>
56 86
57INC = -I. -I$(SYS_INC_DIR) -I$(SYS_INC_DIR)\crt 87# Using cvtres is necessary on NT 3.10 and doesn't hurt on later platforms.
88CVTRES = cvtres.exe
89AR = $(implib)
90# The assignment $(CC) = $(cc) fails even though variables are case sensitive.
91LINK_TMP = $(link)
92LINK = $(LINK_TMP)
93CC_TMP = $(cc)
94CC = $(CC_TMP)
95
96# advapi32.lib is left off of $(baselibs) on NT 3.10
97!if "$(baselibs)" == "kernel32.lib "
98ADVAPI32 = advapi32.lib
99!else
100ADVAPI32 =
101!endif
102
103# Older ntwin32.mak files do not define libc; do it for them.
104!ifndef libc
105libc = libc.lib
106!endif
107
108# The base libraries for compiling Emacs on NT. With MSVC, this should
109# include oldnames.lib.
110BASE_LIBS = $(libc) $(baselibs)
111
112# We want any debugging info in the executable.
113!if "$(LINK)" == "link32"
114SYS_LDFLAGS =
115!else
116SYS_LDFLAGS = -pdb:none -release -incremental:no
117!endif
118
119INC = -I.
58CFLAGS = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH) 120CFLAGS = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH)
59 121
60OBJDIR = obj 122OBJDIR = obj
61$(OBJDIR):; -mkdir $(OBJDIR) 123$(OBJDIR):; -mkdir $(OBJDIR)
62BLD = $(OBJDIR)\$(ARCH) 124BLD = $(OBJDIR)\$(ARCH)
63$(BLD): $(OBJDIR) 125$(BLD): $(OBJDIR)
64 -mkdir $(BLD) 126 -mkdir $(BLD)
@@ -69,24 +131,29 @@ CP_DIR = xcopy /fried
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
70DEL_TREE = echo y | rmdir /s 132DEL_TREE = echo y | rmdir /s
71 133
72!IF "$(ARCH)" == "i386" 134!if "$(ARCH)" == "i386"
73ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od 135ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od
74ARCH_LDFLAGS = -align:0x1000 136ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
75 137
76!ELSE 138!else
77!IF "$(ARCH)" == "mips" 139!if "$(ARCH)" == "mips"
78CC = mcl.exe 140ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
79ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 -D__stdcall= -D__cdecl= 141ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
80ARCH_LDFLAGS = -align:0x1000
81 142
82!ELSE 143!else
83!IF "$(ARCH)" == "alpha" 144!if "$(ARCH)" == "alpha"
84CC = claxp.exe
85ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -D__stdcall= -D__cdecl= 145ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -D__stdcall= -D__cdecl=
86ARCH_LDFLAGS = -align:0x2000 146ARCH_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 151ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
92!ENDIF 152ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
153
154!else
155!ERROR Unknown architecture type "$(ARCH)".
156!endif
157!endif
158!endif
159!endif