30 lines
639 B
Makefile
30 lines
639 B
Makefile
LIBS=input constant element integrator system simulation
|
|
OBJFILES=./src/Solution.o ./src/Problem.o ./src/Network.o ./src/Neuron.o ./src/Genetics.o
|
|
|
|
include ./Makefile.const
|
|
|
|
.PHONY: all
|
|
|
|
all: lib
|
|
|
|
test: all
|
|
make -C tests
|
|
|
|
lib: $(LIBNAME).a $(LIBNAME).so
|
|
|
|
clean:
|
|
rm -f ./src/*.o
|
|
rm -f ./$(LIBNAME).so ./$(LIBNAME).a ./$(LIBNAME).nm
|
|
|
|
%.o : %.cpp %.h
|
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
|
|
|
$(LIBNAME).so: $(OBJFILES)
|
|
$(CXX) -shared $(CXXFLAGS) $(OBJFILES) -o $(LIBNAME).so
|
|
|
|
$(LIBNAME).a: $(OBJFILES)
|
|
rm -f $(LIBNAME).a # create new library
|
|
ar rcv $(LIBNAME).a $(OBJFILES)
|
|
ranlib $(LIBNAME).a
|
|
nm --demangle $(LIBNAME).a > $(LIBNAME).nm
|