view src/Makefile.in @ 80:16ccfaf1476a

The function DEFINE_OCTAVE_ALLOCATOR and DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA are now implemented in the header file. * Makefile.in: the link between different .o file is no longer needed. * *.h: now implement the method described above. * fem_init_env.cc: include the *.h and use the function defined here instead of linking them at compile time
author gedeone-octave <marcovass89@hotmail.it>
date Sat, 03 Aug 2013 14:37:09 +0200
parents 4868e535fc8a
children 66e4aa87c9a1
line wrap: on
line source

MKOCTFILE ?= mkoctfile

OCTFILES=fem_init_env.oct\
             fem_init_mesh.oct \
             fem_get_mesh.oct \
             DirichletBC.oct \
             Expression.oct \
             Function.oct \
             fem_plot.oct \
             fem_save.oct \

LIBS += -ldolfin

all: $(OCTFILES)

fem_init_env.oct: fem_init_env.o
	$(MKOCTFILE) $(CPPFLAGS) -s fem_init_env.o -o $@ $(LDFLAGS) $(LIBS)

fem_init_env.o:  fem_init_env.cc mesh.h functionspace.h boundarycondition.h function.h coefficient.h
	$(MKOCTFILE) $(CPPFLAGS) -c fem_init_env.cc $(LDFLAGS) -o $@ -I.

fem_init_mesh.oct: fem_init_mesh.o
	$(MKOCTFILE) $(CPPFLAGS) -s fem_init_mesh.o -o $@ $(LDFLAGS) $(LIBS)

fem_init_mesh.o: fem_init_mesh.cc mesh.h
	$(MKOCTFILE) $(CPPFLAGS) -c fem_init_mesh.cc $(LDFLAGS) -o $@ -I.

fem_get_mesh.oct: fem_get_mesh.o
	$(MKOCTFILE) $(CPPFLAGS) -s fem_get_mesh.o -o $@ $(LDFLAGS) $(LIBS)

fem_get_mesh.o: fem_get_mesh.cc
	$(MKOCTFILE) $(CPPFLAGS) -c fem_get_mesh.cc $(LDFLAGS) -o $@ -I.

DirichletBC.oct: DirichletBC.o
	$(MKOCTFILE) $(CPPFLAGS) -s DirichletBC.o -o $@ $(LDFLAGS) $(LIBS)

DirichletBC.o: DirichletBC.cc functionspace.h boundarycondition.h expression.h
	$(MKOCTFILE) $(CPPFLAGS) -c DirichletBC.cc $(LDFLAGS) -o $@ -I.

Expression.oct: Expression.o
	$(MKOCTFILE) $(CPPFLAGS) -s Expression.o -o $@ $(LDFLAGS) $(LIBS)

Expression.o: Expression.cc expression.h coefficient.h
	$(MKOCTFILE) $(CPPFLAGS) -c Expression.cc $(LDFLAGS) -o $@ -I.

Function.oct: Function.o
	$(MKOCTFILE) $(CPPFLAGS) -s Function.o -o $@ $(LDFLAGS) $(LIBS)

Function.o: Function.cc function.h
	$(MKOCTFILE) $(CPPFLAGS) -c Function.cc $(LDFLAGS) -o $@ -I.

fem_plot.oct: fem_plot.o
	$(MKOCTFILE) $(CPPFLAGS) -s fem_plot.o -o $@ $(LDFLAGS) $(LIBS)

fem_plot.o: fem_plot.cc 
	$(MKOCTFILE) $(CPPFLAGS) -c fem_plot.cc $(LDFLAGS) -o $@ -I.

fem_save.oct: fem_save.o
	$(MKOCTFILE) $(CPPFLAGS) -s fem_save.o -o $@ $(LDFLAGS) $(LIBS)

fem_save.o: fem_save.cc 
	$(MKOCTFILE) $(CPPFLAGS) -c fem_save.cc $(LDFLAGS) -o $@ -I.

clean:
	-rm -f *.o core octave-core *.oct *~ *.xml

cleanall:
	-rm -f *.o core octave-core *.oct *~ *.xml *.status *.log \
          octave-workspace configure *.pvd *.vtu
	-rm -r autom4te.cache
	-rm -f Makefile