From 4fa4a6bab19f145da7e3db3e749a75ef448d4011 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Tue, 30 Apr 2024 11:28:43 -0400 Subject: fix renderer linkage on mac --- README.md | 1 + makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a962c12..3dab0a7 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Generates a 500x500 julia fractal grid which has a maximum of 30 iterations for ## Visualizations The program `fractal-render` renders `.grid` files into txt, png's, and animated gifs. +The renderer program requires [LibGD](https://libgd.github.io/) to be installed. ``` Usage: fractal-render -i input.grid [-r renderer] [-o output.ext] diff --git a/makefile b/makefile index 8a73420..1885041 100644 --- a/makefile +++ b/makefile @@ -25,7 +25,10 @@ all: $(addprefix $(BUILD_DIR)/, $(TARGET)) ############## $(BUILD_DIR)/fractal-render: $(OBJ_DIR)/grids.o $(OBJ_DIR)/fractal_render.o $(OBJ_DIR)/renderers.o - $(CC) $(CFLAGS) $^ -o $@ -lgd + $(CC) $(CFLAGS) $^ -o $@ $(shell pkg-config --libs gdlib) + +$(OBJ_DIR)/fractal-render.o: $(SRC_DIR)/fractal-render.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags gdlibs) -c -o $@ $< $(BUILD_DIR)/serial-fractals: $(OBJ_DIR)/serial-fractals.o $(OBJ_DIR)/grids.o $(OBJ_DIR)/fractals.o $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -- cgit v1.2.3