75 lines
1.3 KiB
Makefile
75 lines
1.3 KiB
Makefile
#/bin/sh
|
|
#
|
|
# $Source$
|
|
# $Author$
|
|
# $Revision$
|
|
# $Date$
|
|
#
|
|
|
|
.SUFFIXES :
|
|
.SUFFIXES : .c .d .o
|
|
|
|
# the directory where the Cantera libraries are located
|
|
CANTERA_LIBDIR=@buildlib@
|
|
|
|
# the directory where Cantera include files may be found.
|
|
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
|
|
|
# the C++ compiler
|
|
CXX = @CXX@
|
|
|
|
# the C compiler
|
|
CC = @CC@
|
|
|
|
# C++ compile flags
|
|
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
|
|
|
|
# Local include files
|
|
CXX_INCLUDES=-I../f2c_libs
|
|
|
|
# How to compile the dependency file
|
|
.c.d:
|
|
g++ -MM $(CXX_FLAGS) $(CXX_INCLUDES) $*.c > $*.d
|
|
|
|
# How to compile a C file
|
|
.c.o:
|
|
@CC@ -c $< @DEFS@ $(CXX_FLAGS) $(CXX_INCLUDES)
|
|
|
|
# -----------------------------------------------
|
|
|
|
LIB = $(CANTERA_LIBDIR)/librecipes.a
|
|
|
|
all: $(LIB)
|
|
|
|
# list of object files
|
|
OBJS = simp1.o simp2.o simp3.o simplx.o splint.o \
|
|
splie2.o spline.o splin2.o
|
|
|
|
# list of source files
|
|
SRCS = $(OBJS:.o=.c)
|
|
|
|
# List of dependency files to be created
|
|
DEPENDS=$(OBJS:.o=.d)
|
|
|
|
# rule to make library
|
|
$(LIB): $(OBJS)
|
|
@ARCHIVE@ $(LIB) $(OBJS) > /dev/null
|
|
|
|
# ------------------------------------------------
|
|
# Utility Targets
|
|
|
|
clean:
|
|
$(RM) $(OBJS) $(LIB) *.d .depends
|
|
|
|
# depends target
|
|
depends:
|
|
$(RM) *.d .depends
|
|
@MAKE@ .depends
|
|
|
|
.depends: $(DEPENDS)
|
|
cat *.d > .depends
|
|
|
|
|
|
ifeq ($(wildcard .depends), .depends)
|
|
include .depends
|
|
endif
|