-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.xp
90 lines (70 loc) · 2.88 KB
/
Makefile.xp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Makefile version 3 for Crafty 16.15
# Crafty v16.x makefile for Windows NT Intel
# Written by Jason Deines ([email protected]) April 1998
# Version modified by Gregor Overney ([email protected]) Nov 1998
# Version modified by Peter Karrer ([email protected]) Dec 1998
# Version modified by Gregor Overney ([email protected]) Sep 1999
#
# This makefile is designed to be used from the command line with
# Microsoft's nmake. Either rename this # file to "Makefile" or name it
# explicitly when invoking nmake:
# nmake -f Makefile.xp
#
# The makefile is set up for Microsoft Visual C++ 6.0 Intel.
#
# The default target produces a file called "crafty.exe".
# Build target is defined here.
TARGET = NT_i386
# Command-line compiler and linker invocation commands:
CC = cl
LD = link
# Base compiler flags needed for build:
BFLAGS = /D_CONSOLE /DWIN64 /D_CRT_SECURE_NO_DEPRECATE
# Compiler flags:
# /O2 optimize for speed
# /Oa assume no aliasing (no good for VC 6 without SP3)
# /Gr fastcall calling convention
# /G5 target Pentium (but will run on all x86 architectures)
# /G6 target Pentium Pro (but will run on all x86 architectures)
# /Ob2 inline function calls if suitable
#
# For debugging use these flags instead:
# CFLAGS = /Od /Zi
# LDFLAGS = /DEBUG /DEBUGTYPE:CV
#
#CFLAGS = /O2 /G6 /Gr /Ob2
#CFLAGS = /Od /Zi
CFLAGS = /Ox /Gr /GL
# Linker flags, normally not needed except for debug builds:
LDFLAGS = /LTCG
#LDFLAGS = /DEBUG /DEBUGTYPE:CV
# See the default crafty makefile for a description of the options below.
# With VC++, defines like COMPACT_ATTACKS, etc, makes the code slower, so
# those # options are disabled by default. FAST is normally not defined
# so that hash statistics are reported -- for the fastest possible
# executable, define FAST below. for 6 piece EGTB support, add /DEGTB6.
#COPTS =
# For an SMP build use/add the following build options.
# NT_INTEREX is defined if you want to use the built-in InterlockedExchange()
# function for thread resource locking, instead of the inline asm routine.
# (This shouldn't be needed, at least on Intel.)
# /MT is a compiler flag needed for multithreaded builds.
#COPTS = /MT /DSMP /DCPUS=4 /DNT_INTEREX
COPTS = /MT /DSMP /DCPUS=4
# To enable assembly optimizations in vcinline.h, use /DVC_INLINE_ASM.
AOPTS = /DVC_INLINE_ASM
ALLOPTS = $(COPTS) $(AOPTS) /D$(TARGET)
objects = crafty.obj egtb.obj
includes = chess.h data.h epd.h epddefs.h epdglue.h vcinline.h
crafty : $(objects)
$(LD) $(LDFLAGS) $(objects) /out:crafty.exe
$(objects) : $(includes)
.c.obj :
$(CC) $(BFLAGS) $(CFLAGS) $(ALLOPTS) /c $*.c
.cpp.obj :
$(CC) $(BFLAGS) $(CFLAGS) $(ALLOPTS) /Zm500 /c $*.cpp
clean:
del /q $(objects)
del /q log.*
del /q game.*
del /q *.bak