########
#
# Makefile for s3mod
#
########

CC	= gcc 
RM	= rm
#
# Uncomment these for Sun s3mod
#
#COPTS	= -O2
#DEFINES	= -DSUN 
#INCLUDES	= -I/usr/local/include -I../include -I/usr/demo/SOUND
#LIBS	= -laudio -lm
#LIBDIR	= -L/usr/demo/SOUND
#SOUNDOBJS = 

#
# Uncomment these for DEC AF s3mod
#
# COPTS	= -O2
# DEFINES	= -DDEC
# INCLUDES	=
# LIBS	=
# LIBDIR	=
# SONUDOBJS = 

#
# Uncomment these for Linux (DSP and GUS support)
#
 COPTS	= -O2
 DEFINES	= -DLINUX -DGUS
 INCLUDES	=
 LIBS	=
 LIBDIR	=
 SOUNDOBJS =  gus.o

#########
# You should not need to edit below here
#########

OBJS	= mod.o s3m.o main.o play.o mix.o cmdline.o
CFILES	= mod.c s3m.c main.c play.c gus.c mix.c cmdline.c
CFLAGS	= $(COPTS) $(DEFINES) $(INCLUDES)
LFLAGS	= $(LIBDIR) $(LIBS)

all: s3mod

s3mod:	$(OBJS) $(SOUNDOBJS)
	$(CC) $(CFLAGS) -o s3mod $(OBJS) $(SOUNDOBJS) $(LFLAGS)

clean:
	-$(RM) -f *~ *.bak *.o s3mod

dep:
	makedepend $(CFLAGS) $(LFLAGS) $(CFILES)

# DO NOT DELETE THIS LINE -- make depend depends on it.

mod.o: mod.h gus.h main.h
s3m.o: mod.h gus.h
main.o: mod.h s3m.h play.h
main.o: main.h gus.h cmdline.h
play.o: mod.h s3m.h play.h gus.h main.h
gus.o: gus.h mod.h s3m.h play.h tables.h
mix.o: mod.h gus.h
cmdline.o: cmdline.h

