#    yamm, Yet Another Micro Monitor
#    lib/Makefile
#    Copyright (C) 1994, 1995  Riccardo Facchetti
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

.c.o:
	$(CC) $(CFLAGS) -c $<

LSRC = comp_dim.c comp_sc.c get_status.c get_tty.c reg.c signals.c\
        start_time.c user_time.c pstat.c wchan.c var.c init.c\
		get_cmdline.c

LOBJ = comp_dim.o comp_sc.o get_status.o get_tty.o reg.o signals.o\
        start_time.o user_time.o pstat.o wchan.o var.o init.o\
		get_cmdline.o

YAMMLIB = ../libyamm.a

INCLUDE = ../../include/extern.h ../../include/define.h \
          ../../include/fakestat.h ../../include/version.h ../$(NCURSESH)

all: $(YAMMLIB)

$(YAMMLIB) : $(INCLUDE) $(LOBJ)
	ar rcs $(YAMMLIB) $(LOBJ)
	ranlib $(YAMMLIB)

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

clean:
	rm -f $(LOBJ)

distclean: clean
	rm -f *.bak .depend pstat.c
	touch .depend

include .depend
