#
# Makefile fuer "Aquarius II -- McDuffins Underwater Missions"
#

PROGNAME = aquarius

RM = rm -f
CC = gcc
# CC = cc				# for HP-UX and others

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
# JOYSTICK = -DNO_JOYSTICK		# no support for joystick in port 0
SOUNDS = -DNO_SOUNDS			# don't play any sounds
# TOONS = -DNO_TOONS			# no animations (for slow systems)
CONFIG = $(GFX_PATH) $(SND_PATH) $(CFG_PATH) $(JOYSTICK) $(SOUNDS) $(TOONS)
# DEBUG = -DDEBUG -g -ansi -pedantic -Wall

# SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux	# for HP-UX (obsolete)
# SYSTEM = -DSYSV -Ae			# for HP-UX
# SYSTEM = -DSYSV			# for systems without 'usleep()'
# INCL = -I/usr/include/X11R5		# for HP-UX and others
# LIBS = -lXpm -lX11
# LIBS = -L/usr/lib/X11R5 -lXpm -lX11	# for HP-UX and others
LIBS = -lXpm -lXpm -lXpm -lX11		# triple "-lXpm" because of Xpm error

# CFLAGS = -O2 $(CONFIG) $(SYSTEM)
CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL)

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)
