Skip to content

Commit

Permalink
Merge pull request #19 from ecrc/egonzalf/fix-makefile
Browse files Browse the repository at this point in the history
Egonzalf/fix makefile
  • Loading branch information
acharara authored Nov 7, 2017
2 parents 77f808a + 0769b54 commit 86032bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.PHONY: all clean

all:
(cd src && make -j)
(cd testing && make -j)

clean:
rm -f -v ./lib/*.a
(cd src && make clean)
(cd testing && make clean)
(cd testing && make clean)
7 changes: 2 additions & 5 deletions testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ include $(KBLAS_TEST3_DIR)/Makefile
C_OBJ= $(patsubst %.c,$(OBJ_DIR)/%.o,$(C_SRC))
EXE= $(patsubst %.c,$(BIN_DIR)/%,$(C_SRC))

$(BIN_DIR)/test_%: $(OBJ_DIR)/test_%.o
$(CC) $(COPTS) $< -o $@ $(LIB_PATH) $(LIB)

all: $(EXE)

$(EXE): $(C_OBJ)

$(EXE): $(BIN_DIR)/%: $(OBJ_DIR)/%.o $(KBLAS_LIB)
$(CC) $(COPTS) $< -o $@ $(LIB_PATH) $(LIB)
clean:
rm -f $(OBJ_DIR)/*.o $(EXE)
2 changes: 1 addition & 1 deletion testing/blas_l2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ C_SRC+= test_sscal.c \
test_dgemv2_dim.c


$(OBJ_DIR)/test_%.o: $(KBLAS_TEST2_DIR)/test_%.c $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%.o: $(KBLAS_TEST2_DIR)/test_%.c $(INC_SRC)
$(CC) $(COPTS) $(INCLUDES) -c $< -o $@
16 changes: 8 additions & 8 deletions testing/blas_l3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ C_SRC+= \
# EXE+= $(patsubst %.c,$(BIN_DIR)/%,$(KBLAS_L3_CSRC))


$(OBJ_DIR)/test_%trmm.o: $(KBLAS_TEST3_DIR)/test_%trmm.c $(KBLAS_TEST3_DIR)/test_trmm.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trmm.o: $(KBLAS_TEST3_DIR)/test_%trmm.c $(KBLAS_TEST3_DIR)/test_trmm.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%trmm_cpu.o: $(KBLAS_TEST3_DIR)/test_%trmm_cpu.c $(KBLAS_TEST3_DIR)/test_trmm_cpu.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trmm_cpu.o: $(KBLAS_TEST3_DIR)/test_%trmm_cpu.c $(KBLAS_TEST3_DIR)/test_trmm_cpu.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%trmm_mgpu.o: $(KBLAS_TEST3_DIR)/test_%trmm_mgpu.c $(KBLAS_TEST3_DIR)/test_trmm_mgpu.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trmm_mgpu.o: $(KBLAS_TEST3_DIR)/test_%trmm_mgpu.c $(KBLAS_TEST3_DIR)/test_trmm_mgpu.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%trsm.o: $(KBLAS_TEST3_DIR)/test_%trsm.c $(KBLAS_TEST3_DIR)/test_trsm.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trsm.o: $(KBLAS_TEST3_DIR)/test_%trsm.c $(KBLAS_TEST3_DIR)/test_trsm.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%trsm_cpu.o: $(KBLAS_TEST3_DIR)/test_%trsm_cpu.c $(KBLAS_TEST3_DIR)/test_trsm_cpu.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trsm_cpu.o: $(KBLAS_TEST3_DIR)/test_%trsm_cpu.c $(KBLAS_TEST3_DIR)/test_trsm_cpu.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%trsm_mgpu.o: $(KBLAS_TEST3_DIR)/test_%trsm_mgpu.c $(KBLAS_TEST3_DIR)/test_trsm_mgpu.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%trsm_mgpu.o: $(KBLAS_TEST3_DIR)/test_%trsm_mgpu.c $(KBLAS_TEST3_DIR)/test_trsm_mgpu.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%gemm.o: $(KBLAS_TEST3_DIR)/test_%gemm.c $(KBLAS_TEST3_DIR)/test_gemm.ch testing_Xtr_common.h $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%gemm.o: $(KBLAS_TEST3_DIR)/test_%gemm.c $(KBLAS_TEST3_DIR)/test_gemm.ch testing_Xtr_common.h $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

$(OBJ_DIR)/test_%gemmXt.o: $(KBLAS_TEST3_DIR)/test_%gemmXt.c $(INC_SRC) $(KBLAS_LIB)
$(OBJ_DIR)/test_%gemmXt.o: $(KBLAS_TEST3_DIR)/test_%gemmXt.c $(INC_SRC)
$(CXX) $(INCLUDES) -c $< -o $@

0 comments on commit 86032bf

Please sign in to comment.