blob: 7ed5ece9cc39d9a02114c27d5fd9f8ac6415acec [file] [log] [blame]
##===- Makefile.f2c ----------------------------------------*- Makefile -*-===##
#
# Enable running Fortran programs with LLVM by using f2c to convert to C and
# link with libf2c, but only until we have a Fortran front-end.
#
##===----------------------------------------------------------------------===##
# FIXME: This would be autoconf'd
include $(LEVEL)/Makefile.config
all::
.PRECIOUS: %.c
ifeq ($(ARCH),x86)
F2C_DIR = /home/vadve/shared/localtools/x86
else
ifeq ($(ARCH),Sparc)
F2C_DIR = /home/vadve/shared/localtools/sparc
endif
endif
F2C = $(F2C_DIR)/bin/f2c
F2C_INC = $(F2C_DIR)/include
F2C_LIB = $(F2C_DIR)/lib
clean::
rm -f $(Source:%.f=%.c)
%.c: %.f
$(F2C) $< > /dev/null 2>&1
CPPFLAGS = -I$(F2C_INC)
LDFLAGS += -L$(F2C_LIB) -lf2c