#
# Makefile fuer "Mirror Magic II -- McDuffins Revenge"
#

PROGNAME = mirrormagic

RM = rm -f
CC = gcc

GFX_PATH = -DGFX_PATH=\"./graphics\"	# path where the graphics are
SND_PATH = -DSND_PATH=\"./sounds\"	# path where the sounds are
CFG_PATH = -DCFG_PATH=\".\"		# path where the config files are

# SOUNDS = -DNO_SOUNDS			# don't play any sounds
# TOONS = -DNO_TOONS			# no animations (for slow systems)
CONFIG = $(GFX_PATH) $(SND_PATH) $(CFG_PATH) $(SOUNDS) $(TOONS)
# SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux	# for HPUX
# SYSTEM = -DSYSV			# for systems without 'usleep()'
# DEBUG = -DDEBUG -g -ansi -pedantic

# CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM)
CFLAGS = -O2 $(CONFIG) $(SYSTEM)
LIBS = -lXpm -lXpm -lXpm -lX11		# triple "-lXpm" because of Xpm error
# LIBS = -lXpm -lX11

OBJS =	main.o \
	init.o \
	images.o \
	events.o \
	tools.o \
	screens.o \
	misc.o \
	game.o \
	editor.o \
	sound.o

all:	$(OBJS)
	$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME)

.c.o:
	$(CC) $(CFLAGS) -c $*.c

clean:
	$(RM) $(OBJS)
