#
# Makefile v$Revision: 1.6 $: $Date: 1994/06/21 19:01:37 $ (David Hinds)\n"
#
ifndef CFLAGS
CFLAGS = -O -Wall -Wstrict-prototypes -pipe -I../linux/drivers/pcmcia
endif

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

YFLAGS = -d
ETC = /etc/pcmcia

all:	cardmgr status

dep:	$(SRCS)
	$(CPP) -M -I../linux/drivers/pcmcia $(SRCS) > .depend

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

install: cardmgr status
	cp cardmgr /usr/sbin
	-mkdir $(ETC)
	if [ -r $(ETC)/config ] ; then mv $(ETC)/config $(ETC)/config.O ; fi
	cp config.sample $(ETC)/config
	if [ -r $(ETC)/network ] ; then mv $(ETC)/network $(ETC)/network.O ; fi
	cp network.sample $(ETC)/network

OBJS = cardmgr.o yacc_config.o lex_config.o
cardmgr: $(OBJS)

status: status.o

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

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




