summaryrefslogtreecommitdiff
path: root/games/crafty/files/patch-aa
blob: 605c37b34fd0b04895a8ae8f8f73adec82e25fb8 (plain) (blame)
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
--- Makefile.orig	Fri Aug  6 11:38:11 1999
+++ Makefile	Mon Aug 23 13:13:58 1999
@@ -23,7 +23,7 @@
 #     SGI      {SGI Workstation running Irix (SYSV/R4) Unix}
 #     SUN      {Sun SparcStation running Solaris (SYSV/R4) Unix}
 #     SUN_BSD  {Sun SparcStation running SunOS (BSD) Unix}
-#     FreeBSD  {80X86 architecture running FreeBSD (unix)}
+#     FreeBSD  {80X86/Alpha architecture running FreeBSD (unix)}
 #   
 #   The next options are optimizations inside Crafty that you will have
 #   test to see if they help.  on some machines, these will slow things
@@ -72,13 +72,15 @@
 # asm     = X86.o
 
 # FreeBSD (gcc 2.6.3)
-#target  = FreeBSD
+target  = FreeBSD
 #CC      = gcc
 #CFLAGS  = -fomit-frame-pointer -m486 -O3 -Wall
 #CXX	 = $(CC)
-#LDFLAGS = 
-#opt     = -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
-#          -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST
+LDFLAGS = 
+opt     = -DCOMPACT_ATTACKS -DUSE_SPLIT_SHIFTS -DUSE_ATTACK_FUNCTIONS
+.if ${MACHINE_ARCH} == "i386"
+opt     +=-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST
+.endif
 
 # FreeBSD (pgcc)
 #target  = FreeBSD
@@ -100,23 +102,28 @@
  
 # LINUX (pgcc)
 # Note: You have to uncomment exactly ONE of the `asm' lines below.
-target  = LINUX
-CC      = gcc
-CXX	= $(CC)
+#target  = LINUX
+#CC      = gcc
+#CXX	= $(CC)
 #CFLAGS = -Wall -pipe -D_REENTRANT -march=i686 -O \
 #         -malign-double -malign-loops=4 -malign-jumps=4 -malign-functions=4\
 #         -mpreferred-stack-boundary=4
-CFLAGS = -Wall -pipe -D_REENTRANT -march=i686 -O -fforce-mem -fomit-frame-pointer
+#CFLAGS = -Wall -pipe -D_REENTRANT -march=i686 -O -fforce-mem -fomit-frame-pointer
 
-LDFLAGS = -lpthread
-opt     = -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
-          -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST -DSMP -DCPUS=4 -DDGT
+#LDFLAGS = -lpthread
+#opt     = -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
+#          -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST -DSMP -DCPUS=4 -DDGT
 
 # Uncomment the FIRST `asm' line for a.out systems.
 # Uncomment the SECOND `asm' line for ELF systems.
 #
-#asm     = X86-aout.o
+.if ${MACHINE_ARCH} == "i386"
+.if ${PORTOBJFORMAT} == "aout"
+asm     = X86-aout.o
+.else
 asm     = X86-elf.o
+.endif
+.endif
  
 # LINUX (gcc)
 # Note: You have to uncomment exactly ONE of the `asm' lines below.
@@ -177,7 +184,7 @@
 
 # Do not change anything below this line!
 
-opts = $(opt) -D$(target)
+CFLAGS += $(opt) -D$(target)
 
 objects = searchr.o search.o thread.o searchmp.o repeat.o next.o nexte.o      \
         nextr.o history.o quiesce.o evaluate.o movgen.o make.o unmake.o       \