Skip to content
Snippets Groups Projects
Commit 33948ea2 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Allow to compile only static version

parent 515dbf38
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ SUBDIRS = $(SRCDIRS) user-doc developer-doc regtest
SUBDIRSCLEAN=$(addsuffix .clean,$(SUBDIRS))
.PHONY: all lib clean $(SRCDIRS) doc docclean check
.PHONY: all lib clean $(SRCDIRS) doc docclean check lib-static
# if machine dependent configuration has been found:
ifdef GCCDEP
......@@ -15,6 +15,9 @@ all: $(SRCDIRS)
lib:
$(MAKE) -C src
lib-static:
$(MAKE) -C src lib-static
$(SRCDIRS):
$(MAKE) -C $@
......
......@@ -2,10 +2,13 @@
.PHONY: all clean lib
# by default we compile the lib directory, which in turn requests all the needeed modules
all: lib
all: lib lib-static
lib:
$(MAKE) -C lib
lib-static:
$(MAKE) -C lib all-static
# list of all the contained directories which can be cleaned
SUBDIRS =$(subst /Makefile,,$(wildcard */Makefile))
......
......@@ -44,12 +44,18 @@ PLUMED_MAIN_STATIC=plumed
PLUMED_MAIN_SHARED=plumed-shared
PLUMED_MAIN_RUNTIME=plumed-runtime
.PHONY: all dirs $(DIRS)
.PHONY: all dirs $(DIRS) all-static
all:
@echo First making other dirs $(DIRS)
$(MAKE) dirs
$(MAKE) lib
all-static:
@echo First making other dirs $(DIRS)
$(MAKE) dirs
$(MAKE) lib-static
dirs: $(DIRS)
$(DIRS):
......@@ -57,12 +63,15 @@ $(DIRS):
# default target
.PHONY: lib
lib: $(PLUMED_KERNEL) $(PLUMED_SHARED_OBJ) $(OBJ_WRAPPER) \
$(PLUMED_MAIN_STATIC) $(PLUMED_MAIN_SHARED) $(PLUMED_MAIN_RUNTIME) \
Plumed.inc Plumed.inc.runtime Plumed.inc.shared Plumed.inc.static \
Plumed.cmake Plumed.cmake.runtime Plumed.cmake.shared Plumed.cmake.static \
plumed-patch
.PHONY: lib lib-static lib-shared
lib: lib-static lib-shared
lib-static: $(PLUMED_MAIN_STATIC) $(OBJ_WRAPPER) Plumed.inc.static Plumed.cmake.static plumed-patch
lib-shared: $(PLUMED_KERNEL) $(PLUMED_SHARED_OBJ) $(PLUMED_MAIN_SHARED) $(PLUMED_MAIN_RUNTIME) \
Plumed.inc Plumed.inc.runtime Plumed.inc.shared \
Plumed.cmake Plumed.cmake.runtime Plumed.cmake.shared
plumed-patch:
@echo "#! /bin/bash" > plumed-patch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment