Category : Miscellaneous Language Source Code
Archive   : FTNCHECK.ZIP
Filename : MAKEFILE

 
Output of file : MAKEFILE contained in archive : FTNCHECK.ZIP

# Unix version of Makefile for Fortran program checker
#
# Add machine-specific targets IBM-RS6000, GENERIC,
# STARDENT, SUNOS4.0, SUNOS4.1, ULTRIX-MIPS

# Copyright (C) 1991 by Robert K. Moniot.
# This program is free software. Permission is granted to
# modify it and/or redistribute it, retaining this notice.
# No guarantees accompany this software.

# Acknowledgements and thanks to Nelson H.F. Beebe of University of Utah
# for improvements to this makefile.

# These definitions should be customized for your local conventions
# if you want to do "make install" or "make uninstall"
BINDIR = /usr/local/bin
CP = /bin/cp
MANDIR = /usr/local/man

# OPTIONS is used to define various characteristics. Most commonly
# needed ones are given below; uncomment whichever you like.
# See ftnchek.h for others, with their defaults and explanations.

# To use the defaults for everything uncomment this:
OPTIONS=

# To make all table sizes 10x bigger than defaults uncomment this:
#OPTIONS= -DLARGE_MACHINE

# To prohibit underscores in variable names, inline comments
# starting with '!', the DO ... ENDDO loop forms and INCLUDE statements:
#OPTIONS= -DSTRICT_SYNTAX


# CFLAGS is used to define the operating system and options
# Other
CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD

YFLAGS= -d

OBJS= ftnchek.o forlex.o fortran.o \
prsymtab.o symtab.o symtab2.o


ftnchek: $(OBJS)
$(CC) -o ftnchek $(OBJS) -lm

install: ftnchek
$(CP) ftnchek $(BINDIR)
- strip $(BINDIR)/ftnchek
chmod 755 $(BINDIR)/ftnchek
$(CP) ftnchek.man $(MANDIR)/man1/ftnchek.1
chmod 744 $(MANDIR)/man1/ftnchek.1

uninstall:
$(RM) $(BINDIR)/ftnchek
$(RM) $(MANDIR)/man1/ftnchek.1

# N.B. tokdefs.h is copy of y.tab.h used to avoid remaking stuff when
# grammar changes but not tokens.

ftnchek.o: ftnchek.h

forlex.o: ftnchek.h tokdefs.h symtab.h

fortran.o: ftnchek.h symtab.h fortran.c

prsymtab.o: ftnchek.h symtab.h

symtab.o: ftnchek.h iokeywds.h intrins.h symtab.h tokdefs.h

symtab2.o: ftnchek.h symtab.h tokdefs.h

check:
lint $(LINTFLAGS) ftnchek.c forlex.c \
fortran.c prsymtab.c symtab.c symtab2.c -lm

RM = /bin/rm -f
clean:
$(RM) \#* *~ core *.o

clobber: clean
$(RM) ftnchek

#=======================================================================
# Machine specific targets to build ftnchek with suitable compile
# options.

IBM-RS6000:
make "CC = c89 -D_POSIX_SOURCE" "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"

GENERIC STARDENT UNIX:
make "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"

SUNOS4.0:
make "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"

SUNOS4.1:
make "CFLAGS= -DUNIX $(OPTIONS) -O4 -D_BSD"

ULTRIX-MIPS:
make "CFLAGS= -DUNIX $(OPTIONS) -Olimit 2000 -O -D_BSD"