DEST	      = /usr/local/bin

EXTHDRS	      = /usr/include/stdio.h

HDRS	      = comtab.h \
		hash.h \
		l2sl.h

CFLAGS	      = -g

LIBS	      = -ll

MAKEFILE      = Makefile

OBJS	      = comtab.o \
		hash.o \
		lex.o \
		l2sl.o

PRINT	      = pr

PROGRAM	      = l2sl

SRCS	      = comtab.c \
		hash.c \
		lex.l \
		l2sl.c

all:		$(PROGRAM)

$(PROGRAM):     $(OBJS)
		cc $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

clean:;		@rm -f $(OBJS)

depend:;	@mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)

index:;		@ctags -wx $(HDRS) $(SRCS)

install:	$(PROGRAM)
		@echo Installing $(PROGRAM) in $(DEST)
		@install -s $(PROGRAM) $(DEST)

print:;		@$(PRINT) $(HDRS) $(SRCS)

program:        $(PROGRAM)

tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)

update:		$(DEST)/$(PROGRAM)

$(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
		@make -f $(MAKEFILE) DEST=$(DEST) install
###
comtab.o: comtab.h
hash.o: /usr/include/stdio.h hash.h comtab.h
l2sl.o: /usr/include/stdio.h l2sl.h hash.h