#
# Makefile for ALSA Sequencer
# Copyright (c) 1998 by Frank van de Pol <frank@vande-pol.demon.nl>
#

TOPDIR  = ../..

include $(TOPDIR)/Makefile.conf

TARGETS = $(SNDVERSIONS) \
	  $(TOPDIR)/modules/snd-seq.o \
	  $(TOPDIR)/modules/snd-seq-midi.o
SYMFILES= seq_export.c seq_midi_export.c
OBJECTS = seq.o seq_clientmgr.o seq_memory.o seq_queue.o \
          seq_fifo.o seq_prioq.o seq_timer.o \
          seq_system.o seq_ports.o seq_export.o \
          seq_info.o
MIDI    = seq_midi.o seq_midi_export.o

include $(TOPDIR)/Rules.make

all: $(TARGETS)
	@echo
	@echo "ALSA sequencer modules were sucessfully compiled."
	@echo

include $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-seq.o: .depend $(SNDVERSIONS) $(OBJECTS)
	$(LINKER) -o $@ $(OBJECTS)

$(TOPDIR)/modules/snd-seq-midi.o: .depend $(SNDVERSIONS) $(MIDI)
	$(LINKER) -o $@ $(MIDI)

gcompile: $(TARGETS)

ARCH_SOURCES = \
	Makefile README Changes \
	*.c *.h *.sym\
	../../include/seq*.h\

snapshot: 
	rm $(SYMFILES)
	tar czvf ../../../archive/snapshot-kernel-`date +%d%b%Y`.tar.gz $(ARCH_SOURCES)
	ls -l  ../../../archive/snapshot-*-`date +%d%b%Y`.tar.gz

ci:
	ci -l $(ARCH_SOURCES)

clean:
	rm -f .depend *.o *.orig snd.map snd.map? *.old *~
	rm -f core $(SNDVERSIONS) $(SYMFILES)

.depend: $(SYMFILES)
	$(CPP) $(COPTS) $(INCLUDE) *.c > .depend

dep:	.depend

dummy:

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