1 ##===- Makefile.f2c ----------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 # Enable running Fortran programs with LLVM by using f2c to convert to C and
11 # link with libf2c, but only until we have a Fortran front-end.
13 ##===----------------------------------------------------------------------===##
15 # FIXME: This would be autoconf'd
16 include $(LEVEL)/Makefile.config
18 # Make sure the correct targets come first.
27 echo "The f2c program was not found"
34 rm -f $(Source:%.f=%.c)
37 $(F2C) $< > /dev/null 2>&1
39 CPPFLAGS = -I$(F2C_INC)
40 LDFLAGS += -L$(F2C_LIB) -lf2c
43 # 'main' is defined in the f2c runtime library. The function exported from the
44 # program is named MAIN__
45 EXTRA_LINKTIME_OPT_FLAGS += -internalize-public-api-list=MAIN__