diff --git a/Cantera/user/Makefile.in b/Cantera/user/Makefile.in new file mode 100644 index 000000000..3e7740fbf --- /dev/null +++ b/Cantera/user/Makefile.in @@ -0,0 +1,54 @@ +#/bin/sh +############################################################### +# $Author$ +# $Date$ +# $Revision$ +# +# Copyright 2002 California Institute of Technology +# +############################################################### + +SUFFIXES= +SUFFIXES= .cpp .d .o + +OBJDIR = . + +CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) + +# list your object files here +OBJS = user.o + +CXX_INCLUDES = -I../src + +LIB = @buildlib@/libuser.a + +DEPENDS = $(OBJS:.o=.d) + +%.d: + g++ -MM $(CXX_INCLUDES) $*.cpp > $*.d + +.cpp.o: + @CXX@ -c $< $(CXX_FLAGS) $(CXX_INCLUDES) + +.f.o: + @F77@ -c $< $(F77_FLAGS) + +all lib: $(LIB) + +$(LIB): $(OBJS) + @ARCHIVE@ $(LIB) $(OBJS) > /dev/null + +clean: + $(RM) *.o *~ $(LIB) + +depends: $(DEPENDS) + cat *.d > .depends + $(RM) $(DEPENDS) + +TAGS: + etags *.h *.cpp + +ifeq ($(wildcard .depends), .depends) +include .depends +endif + diff --git a/Cantera/user/user.cpp b/Cantera/user/user.cpp new file mode 100644 index 000000000..9e8c793b4 --- /dev/null +++ b/Cantera/user/user.cpp @@ -0,0 +1,16 @@ +/* + * This is an example of a user-defined function that can be linked into Cantera. + */ + +#include + +#include "ct_defs.h" +using namespace Cantera; + +namespace User { + + void hello() { + cout << "Hello!" << endl; + } + +}