# $Header:Makefile 12.0$ 
# $ACIS:Makefile 12.0$ 
# $Source: /ibm/acis/usr/src/usr.bin/f77/src/f2/RCS/Makefile,v $ 

DESTDIR	      = 

EXTHDRS	      = /usr/include/ctype.h \
		/usr/include/stdio.h \
		/usr/include/stdio.h

HDRS	      = error.h \
		inst.h \
		inst3.h \
		instps.h \
		opt.h

LDFLAGS	      =

LIBS	      =

CC	      = cc

MAKEFILE      = Makefile

OBJS	      = balropt.o \
		ctypes.o \
		jumpopt.o \
		lab.o \
		loadopt.o \
		miscopt.o \
		mropt.o \
		nodes.o \
		opcodtab.o \
		opeval.o \
		opterror.o \
		readpgm.o \
		regvar.o \
		ropt.o \
		storage.o \
		writepgm.o

PRINT	      = pr

PROGRAM	      = f2

SRCS	      = balropt.c \
		ctypes.c \
		jumpopt.c \
		lab.c \
		loadopt.c \
		miscopt.c \
		mropt.c \
		nodes.c \
		opcodtab.c \
		opeval.c \
		opterror.c \
		readpgm.c \
		regvar.c \
		ropt.c \
		storage.c \
		writepgm.c

all:		$(PROGRAM)

$(PROGRAM):     $(OBJS) $(LIBS)
		@echo -n "Loading $(PROGRAM) ... "
		@$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
		@echo "done"

clean:;		@rm -f $(OBJS)

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

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

install:	all
		@echo Installing $(PROGRAM) in $(DESTDIR)/lib
		@install -c -s $(PROGRAM) $(DESTDIR)/lib/$(PROGRAM)

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

program:        $(PROGRAM)

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

update:		$(DESTDIR)/$(PROGRAM)

$(DESTDIR)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
		@make -f $(MAKEFILE) DESTDIR=$(DESTDIR) install
###
balropt.o: /usr/include/stdio.h opt.h inst.h
jumpopt.o: /usr/include/stdio.h opt.h inst.h instps.h error.h \
	/usr/include/ctype.h
lab.o: /usr/include/stdio.h opt.h inst.h instps.h error.h
loadopt.o: /usr/include/stdio.h opt.h inst.h instps.h error.h
miscopt.o: /usr/include/stdio.h opt.h instps.h inst.h error.h
mropt.o: /usr/include/stdio.h opt.h inst.h instps.h error.h
nodes.o: /usr/include/stdio.h opt.h error.h instps.h
opcodtab.o: opt.h inst.h instps.h
opeval.o: /usr/include/stdio.h opt.h error.h instps.h
opterror.o: /usr/include/stdio.h error.h opt.h
readpgm.o: /usr/include/stdio.h opt.h error.h instps.h /usr/include/ctype.h
regvar.o: /usr/include/stdio.h opt.h instps.h inst.h error.h
ropt.o: /usr/include/stdio.h opt.h error.h inst.h instps.h
storage.o: /usr/include/stdio.h opt.h error.h
writepgm.o: /usr/include/stdio.h opt.h error.h instps.h
