Compiling for Unix
Posted: 08 May 2007, 20:20
Hi all. Let me let you know that I'm not at all experienced with making Unix compiles. For Buzz I've been making "Unix" compiles on Ubuntu. For some reason this compile will not work on someone else's computer which runs under Suse; but when a compile was made on the Suse computer, it ran fine. This is the makefile I use to compile Buzz under Unix:
Does anyone know why an Ubuntu compile won't work on Suse? Also is it possible to make a generic "UNIX" compile that will work on MacOS, Linux, Solaris, ect. as long as they all run on the same processor?
- Code: Select all
#Makefile for Buzz
CC = gcc
LD = gcc
CFLAGS = -g -x c -std=c99 -DNDEBUG -D_POSIX -O3 -w
LDFLAGS = -s -pthread
RM = /bin/rm -f
OBJS = bitinstructions.o board.o book.o consolecolors.o eval.o hash.o log.o magicmoves.o main.o movegen.o moveordering.o mt19937-64.o recog.o search.o thread.o timemanager.o xboard.o
PROG = Buzz
$(PROG): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
%.o: %.c
$(CC) $(CFLAGS) -c $<
clean:
-rm *.o *~
Does anyone know why an Ubuntu compile won't work on Suse? Also is it possible to make a generic "UNIX" compile that will work on MacOS, Linux, Solaris, ect. as long as they all run on the same processor?