
TARGET=icebreaker
all: $(TARGET)

DATAPREFIX=<IceBreaker$$Dir>/data/
HISCORE=<IceBreaker$$Dir>/data/

CC	= gcc
CFLAGS	= -O2 -ISDL: -D_REENTRANT -DDATAPREFIX=\"$(DATAPREFIX)\" \
          -DHISCOREPREFIX=\"$(HISCORE)\" -O0
LDFLAGS = -LSDL: -lSDL_mixer -lSDL_image -lz -ljpeg -lpng -ltiff  -lSDL

$(TARGET): cursor.o dialog.o fullscreen.o grid.o hiscore.o icebreaker.o intro.o laundry.o level.o line.o options.o penguin.o sound.o status.o text.o transition.o
	$(CC) -o $(TARGET) cursor.o dialog.o fullscreen.o grid.o hiscore.o icebreaker.o intro.o laundry.o level.o line.o options.o penguin.o sound.o status.o text.o transition.o $(LDFLAGS)

cursor.o: cursor.c cursor.h icebreaker.h

dialog.o: dialog.c icebreaker.h globals.h text.h laundry.h dialog.h sound.h hiscore.h options.h fullscreen.h

fullscreen.o: fullscreen.c icebreaker.h globals.h laundry.h

grid.o: grid.c icebreaker.h laundry.h grid.h penguin.h globals.h

hiscore.o: hiscore.c icebreaker.h globals.h hiscore.h

icebreaker.o: icebreaker.c icebreaker.h penguin.h line.h grid.h sound.h globals.h level.h intro.h text.h transition.h hiscore.h dialog.h options.h fullscreen.h cursor.h

intro.o: intro.c icebreaker.h cursor.h penguin.h line.h grid.h sound.h laundry.h globals.h level.h status.h text.h hiscore.h
	$(CC) -c $< -o $@ $(CFLAGS) -O0 

laundry.o: laundry.c icebreaker.h globals.h laundry.h

level.o: level.c icebreaker.h cursor.h penguin.h line.h grid.h laundry.h sound.h globals.h level.h status.h text.h dialog.h options.h

line.o: line.c icebreaker.h globals.h line.h laundry.h grid.h

options.o: options.c icebreaker.h globals.h icebreaker.h options.h

penguin.o: penguin.c icebreaker.h globals.h penguin.h grid.h line.h level.h options.h

sound.o: sound.c sound.h icebreaker.h options.h

status.o: status.c icebreaker.h text.h globals.h hiscore.h laundry.h status.h

text.o: text.c icebreaker.h text.h globals.h

transition.o: transition.c icebreaker.h globals.h line.h level.h text.h cursor.h laundry.h hiscore.h dialog.h



clean:
	wipe o.* ~C~V 
