diff --git a/Makefile b/Makefile index f7162b9..295fd20 100644 --- a/Makefile +++ b/Makefile @@ -62,12 +62,15 @@ OBJECTS = $(patsubst %.$(SRC_EXT), $(OBJ_DIR)/%.o, $(notdir $(SOURCES))) # Executables EXECUTABLES = $(patsubst %.$(SRC_EXT), $(BIN_DIR)/%, $(notdir $(SOURCES_EXECS))) +# Executables (parallel) +EXECUTABLES_PAR = $(patsubst %.$(SRC_EXT), $(BIN_DIR)/%, $(notdir $(SOURCES_EXECS_PAR))) + # Main target: all executables (and thus the library, and thus all objects) all: $(EXECUTABLES) # Build executables -$(EXECUTABLES): $(BIN_DIR)/%: $(SRC_DIR)/EXECS/%.$(SRC_EXT) lib$(VERSION).a +$(EXECUTABLES): $(BIN_DIR)/%: $(SRC_DIR)/EXECS/%.$(SRC_EXT) $(LIB_DIR)/lib$(VERSION).a $(COMPILE) $< -o $@ -l$(VERSION) # Compile all object files @@ -75,10 +78,8 @@ $(OBJ_DIR)/%.o: %.$(SRC_EXT) $(COMPILE) -c $< -o $@ # Create the ABACUS library -lib$(VERSION).a : $(OBJECTS) - ar -cr lib$(VERSION).a $(OBJECTS) - mv lib$(VERSION).a $(LIB_DIR)/ - +$(LIB_DIR)/lib$(VERSION).a : $(OBJECTS) + ar -cr $(LIB_DIR)/lib$(VERSION).a $(OBJECTS) ########################################### # Cleanup