#
# Makefile for application interface library for the GUS driver (Linux version)
# It's only for ELF binary format, don't use with a.out compiler!
# Copyright (c) 1994/95 by Jaroslav Kysela (Perex soft)
#

DIRINC	= /usr/local/include
DIRLIB	= /usr/local/lib

FLAGS	=
FLAGS	:= $(FLAGS) -DDEBUG

TARGET  = libgus.so.1.0.0
TARGETO = libgus.so.1
TARGETA = libgus.sa
CC	= gcc
INCLUDE = -I/usr/src/linux/include
CFLAGS  = -DLINUX $(FLAGS)
COPTS   = -Wall -Wstrict-prototypes -O2 -m486 -fomit-frame-pointer -pipe -fPIC

SUBDIRS =

OBJECTS = debug.o synth.o mixer.o convert.o spline.o

.c.o:
	$(CC) $(COPTS) $(CFLAGS) $(INCLUDE) -c -o $*.o $<

all: .depend $(TARGET)

$(TARGET): $(OBJECTS)
	gcc -shared -Wl,-soname,$(TARGETO) -o $(TARGET) $(OBJECTS)

install: all
	cp -p libgus.h $(DIRINC)
	cp -p $(TARGET) $(DIRLIB)
	ln -sf $(DIRLIB)/$(TARGET) $(DIRLIB)/$(TARGETO)

clean:
	- rm -f .depend *.o *~ $(TARGET) out.txt libgus.a

.depend:
	$(CPP) $(CFLAGS) $(INCLUDE) -M *.c > .depend

dep:	.depend

dummy:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
