1#
2# The Rubik's cube.
3#
4# Sed - april 1999 / december 2003.
5#
6# This program is in the public domain.
7#--------------------
8# The Makefile
9#
10
11# Customize to fit your needs (especially if it does not work for now).
12
13LANGUAGE=ENGLISH
14GAMESDIR=/usr/games
15
16#architecture=-DPC_ARCHI
17
18# For Solaris
19#EXTRALIBS=-lsocket
20
21CC=gcc
22CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math \
23   -DGAMESDIR="\"$(GAMESDIR)\"" \
24   -D$(LANGUAGE) $(architecture)
25
26#CFLAGS=-Wall -g -ffast-math -Iplayer $(architecture)
27XINC=-I/usr/X11R6/include
28XLIB=-L/usr/X11R6/lib -lX11
29
30#the following should not be changed.
31
32OBJ=cube.o event.o fillpoly.o line.o main.o screen.o
33
34rubix : $(OBJ)
35	$(CC) $(CFLAGS) -o $@ $^ -lm $(XLIB) $(EXTRALIBS)
36#	strip rubix
37
38install :
39	mkdir -p $(GAMESDIR)
40	install -c -s rubix $(GAMESDIR)
41
42clean :
43	rm -f *.o *~ core *.bak *.dat gmon.out
44	rm -f rubix rubix.bin rubix.num rubix.gen rubix.pos
45
46dep :
47	makedepend -Y *.c -s"#I like the GNU tools"
48
49%.o : %.c
50	$(CC) $(CFLAGS) $(XINC) -c -o $@ $<
51
52#I like the GNU tools
53
54cube.o: cube.h screen.h fillpoly.h poly.h device.h line.h
55event.o: event.h screen.h cube.h
56fillpoly.o: device.h poly.h
57line.o: line.h device.h poly.h screen.h cube.h
58main.o: messages.h screen.h cube.h event.h device.h version.h
59screen.o: screen.h cube.h device.h
60