blob: a00ec0e593be0231ca2e6649f1177b5acd423a8e (
plain)
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
|
$NetBSD: patch-aa,v 1.1.1.1 2000/10/15 08:38:22 jlam Exp $
--- Makefile.orig Sun May 17 19:09:21 1998
+++ Makefile
@@ -5,8 +5,8 @@
CC = gcc
# What compiler switches do you want? These ones work well with gcc
-#OPT = -O2 -fshort-enums -Wall
-OPT = -g -fshort-enums -Wall
+OPT = -O2 -fshort-enums -Wall
+#OPT = -g -fshort-enums -Wall
# If you don't have gcc then perhaps try this instead. You only need
# the null definition for inline if your C compiler doesn't know about
@@ -21,31 +21,36 @@
# display (or you don't have OpenGL and Glut libraries)
# If you do have these libs then make sure the first three
# lines point at the right places
-MESA = /usr/local/Mesa-2.1
-GLUT = /usr/local/Mesa-2.1/glut-3.2
-X11 = /usr/X11R6
-GLUT_LIBS = -L$(GLUT)/lib/glut -lglut
-MESA_LIBS = -L$(MESA)/lib -lMesaGLU -lMesaGL -lm
-XLIBS = -L$(X11)/lib -lXmu -lXt -lXext -lX11 -lXi
-DISPLAYFLAGS = -I$(MESA)/include -I$(GLUT) -DRENDERED_DISPLAY=1
+MESA ?= ${X11BASE}
+GLUT = $(MESA)
+X11 = ${X11BASE}
+GLUT_LIBS = -L$(GLUT)/lib -Wl,-R$(GLUT)/lib -lglut
+MESA_LIBS = -L$(MESA)/lib -Wl,-R$(MESA)/lib -lGLU -lGL -lm
+XLIBS = -L$(X11)/lib -lXmu -lXt -lXext -lX11 -lXi -lICE -lSM
+DISPLAYFLAGS = -I$(MESA)/include -I$(GLUT)/include -DRENDERED_DISPLAY=1
# comment out the following line if you don't want KnightCap's
# evaluation function learning turned on.
-LEARNFLAGS = -DLEARN_EVAL=1
+#
+# On NetBSD, this causes mysterious segfaults that GDB can't track down,
+# so disable the evaluation function learning.
+#
+# LEARNFLAGS = -DLEARN_EVAL=1
# you shouldn't need to edit anything below this line. Unless
# something goes wrong.
INCLUDE = $(DISPLAYFLAGS)
-CFLAGS = $(OPT) $(INCLUDE) $(LEARNFLAGS)
+CFLAGS += $(OPT) $(DEFINES) $(INCLUDE) $(LEARNFLAGS)
-LIBS = $(GLUT_LIBS) $(MESA_LIBS) $(XLIBS)
+LIBS = $(LDFLAGS) $(GLUT_LIBS) $(MESA_LIBS) $(XLIBS)
TARGET = KnightCap
OBJS = knightcap.o trackball.o move.o util.o generate.o eval.o movement.o \
ordering.o hash.o board.o log.o prog.o timer.o ics.o display.o \
testsuite.o brain.o td.o tactics.o
+OBJS+= epd.o epdglue.o
$(TARGET): $(OBJS)
-mv $@ $@.old
|