Skip to content

Commit

Permalink
update makefile and unify naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspen Cherie Smith committed Dec 7, 2024
1 parent 98deccf commit 86cee73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ SRC_DIR=common
ALGO_DIR=algorithms
BUILD_DIR=build

all: brute dp genetic cu_genetic dp_omp
all: brute dp genetic greedy genetic_cuda dp_omp dp_cuda greedy_cuda

brute: $(BUILD_DIR)/brute
dp: $(BUILD_DIR)/dp
greedy: $(BUILD_DIR)/greedy
genetic: $(BUILD_DIR)/genetic
cu_genetic: $(BUILD_DIR)/cu_genetic
genetic_cuda: $(BUILD_DIR)/genetic_cuda
dp_omp: $(BUILD_DIR)/dp_omp
greedy_cuda: $(BUILD_DIR)/greedy_cuda
dp_cuda: $(BUILD_DIR)/dp_cuda

$(BUILD_DIR)/brute: $(SRC_DIR)/main.cpp $(ALGO_DIR)/brute.cpp
$(CPP) $^ -o $@ $(CFLAGS) $(OPTFLAGS)
Expand All @@ -34,7 +35,7 @@ $(BUILD_DIR)/greedy: $(SRC_DIR)/main.cpp $(ALGO_DIR)/greedy.cpp
$(BUILD_DIR)/genetic: $(SRC_DIR)/main.cpp $(ALGO_DIR)/genetic.cpp
$(CPP) $^ -o $@ $(CFLAGS) $(OPTFLAGS)

$(BUILD_DIR)/cu_genetic: $(SRC_DIR)/main.cpp $(ALGO_DIR)/genetic.cu
$(BUILD_DIR)/genetic_cuda: $(SRC_DIR)/main.cpp $(ALGO_DIR)/genetic_cuda.cu
$(NVCC) $^ -o $@ $(NVCCFLAGS)

$(BUILD_DIR)/dp_omp: $(SRC_DIR)/main.cpp $(ALGO_DIR)/dp_omp.cpp
Expand All @@ -43,6 +44,9 @@ $(BUILD_DIR)/dp_omp: $(SRC_DIR)/main.cpp $(ALGO_DIR)/dp_omp.cpp
$(BUILD_DIR)/greedy_cuda: $(SRC_DIR)/main.cpp $(ALGO_DIR)/greedy_cuda.cu
$(NVCC) $^ -o $@ $(NVCCFLAGS)

$(BUILD_DIR)/dp_cuda: $(SRC_DIR)/main.cpp $(ALGO_DIR)/dp_cuda.cu
$(NVCC) $^ -o $@ $(NVCCFLAGS)

.PHONY: clean

clean:
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 86cee73

Please sign in to comment.