aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-04-30 11:28:43 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-04-30 11:28:43 -0400
commit4fa4a6bab19f145da7e3db3e749a75ef448d4011 (patch)
tree699097275658c7d54bc85d9149e1f02e52b0a3ff
parent3efffb9ca98303487cf091447c7ba3fba3c71df8 (diff)
fix renderer linkage on mac
-rw-r--r--README.md1
-rw-r--r--makefile5
2 files changed, 5 insertions, 1 deletions
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)