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

CC=/opt/snow-gcc/bin/mipsel-linux-gcc
CFLAGS=-Wall
#CFLAGS+=-g
CFLAGS+=-B/opt/snow-gcc/lib/snow/ -O3 -ffast-math -fomit-frame-pointer

XINCLUDE=-I/opt/snow-gcc/include
XLIBS=-L/opt/snow-gcc/lib/snow

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

PROG=rubiclox

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

%.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
