#/*
# * Rubik's clock.
# *
# * This file is public domain, I just hate copy[left/right]s.
# *-------------
# * the Makefile
# */

CC=gcc
CFLAGS=-Wall
#CFLAGS+=-g
CFLAGS+=-O3 -ffast-math -fomit-frame-pointer

XINCLUDE=-I/usr/X11R6/include
XLIBS=-L/usr/X11R6/lib

OBJS=main.o clock.o event.o screen.o save.o solver.o

PROG=rubiclox

$(PROG) : $(OBJS)
	$(CC) $(CFLAGS) -o $(PROG) $(XLIBS) -lX11 -lm $(OBJS)
	strip $(PROG)

%.o : %.c Makefile
	$(CC) $(CFLAGS) $(XINCLUDE) -c -o $@ $<

clean :
	rm -f *.o *~ core $(PROG) *.bak saved.rcd

dep :
	makedepend -s "#I hate copyrights and copylefts" -Y *.c *.h

diff :
	diff -r -N -u current-release-dir next-release-dir

.PHONY : clean dep diff

#I hate copyrights and copylefts

clock.o: clock.h screen.h event.h
event.o: event.h clock.h screen.h solver.h
main.o: clock.h screen.h event.h save.h
save.o: save.h clock.h screen.h event.h version.h
screen.o: screen.h event.h clock.h version.h
solver.o: solver.h clock.h screen.h event.h
clock.o: screen.h event.h clock.h
event.o: clock.h screen.h event.h
save.o: clock.h screen.h event.h
screen.o: event.h clock.h screen.h
solver.o: clock.h screen.h event.h
