aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/makefile b/makefile
index 47967f4..7844d98 100644
--- a/makefile
+++ b/makefile
@@ -20,9 +20,15 @@ all: $(BUILD_DIR)/$(TARGET)
# Programs #
##############
-build/fractals: $(OBJ_DIR)/fractals.o $(OBJ_DIR)/serial-fractals.o $(OBJ_DIR)/grids.o
+$(BUILD_DIR)/serial-fractals: $(OBJ_DIR)/fractals.o $(OBJ_DIR)/serial-fractals.o $(OBJ_DIR)/grids.o
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
+$(BUILD_DIR)/shared-fractals: $(OBJ_DIR)/fractals.o $(OBJ_DIR)/shared-fractals.o $(OBJ_DIR)/grids.o
+ $(CC) $(CFLAGS) -fopenmp $^ -o $@ $(LDFLAGS)
+
+$(OBJ_DIR)/shared-fractals.o: $(SRC_DIR)/shared-fractals.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -fopenmp-c -o $@ $<
+
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
@@ -51,4 +57,4 @@ analysis: analysis/analysis.html
analysis/analysis.html: analysis/analysis.Rmd # TODO: add compile command
clean:
- rm -rf presentation/presentation.html analysis/analysis.html $(OBJS)
+ rm -rf $(BUILD_DIR)/* presentation/presentation.html analysis/analysis.html