#
# Makefile v$Revision: 1.15 $: $Date: 1994/08/18 19:47:16 $ (David Hinds)
#

# Include site dependent options
include ../make.options

ifndef CFLAGS
CFLAGS = -O -Wall -Wstrict-prototypes -pipe -I../modules
XFLAGS = -O -pipe -I../modules
endif

SRCS = cardmgr.c status.c yacc_config.c lex_config.c probe.c

YFLAGS = -d

all:	cardmgr status probe

dep:	$(SRCS)
	$(CPP) -M -I../modules $(SRCS) > .depend

clean:
	rm -f core core.* *.o *.a tmp_make *~
	for i in *.c;do rm -f `basename $$i .c`.s;done
	rm -f lex_config.c yacc_config.c
	rm -f cardmgr status probe

cardmgr: cardmgr.o yacc_config.o lex_config.o

cardmgr.o: cardmgr.c
	$(CC) $(CFLAGS) -DMODDIR=\"$(MODDIR)\" -DETC=\"$(ETC)\" -c cardmgr.c

yacc_config.o: yacc_config.c
	$(CC) $(XFLAGS) -c yacc_config.c

lex_config.o: lex_config.c
	$(CC) $(XFLAGS) -c lex_config.c

parser: lex_config.o yacc_config.c
	$(CC) $(CFLAGS) -DDEBUG -o parser yacc_config.c lex_config.o

install: cardmgr
	cp -f cardmgr /sbin/cardmgr

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




