# Makefile for the Linux Alternate-Sound-Driver PCSP
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes. (hopefully)
#
# Stolen from the sound Makefile, Michael Beck - beck@informatik.hu-berlin.de
#

.c.s:
	$(CC) $(CFLAGS) -S $<
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) -c $<

OBJS	= pcsp.o pcsndriv.o pcsp_mixer.o

all:	pcsp.a

pcsp.a: local.h $(OBJS) 
	$(AR) rcs pcsp.a $(OBJS)
	sync

config:
	@./configure

local.h:
	@./configure

clean:
	rm -f core *.o *.a *.BAK *.BA *.B
	for i in *.c;do rm -f `basename $$i .c`.s;done

indent:
	for n in *.c;do echo indent $$n;indent $$n;done

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

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