Add Makefile and tweak makefile

master
BeardedBread 2021-09-16 10:37:03 +08:00
parent 8d94b7ea7b
commit 978d1cb93c
2 changed files with 16 additions and 1 deletions

View File

@ -4,7 +4,7 @@ BUILD_DIR = build/
OBJ = $(patsubst %.c,$(BUILD_DIR)%.o,$(SRC_FILES)) OBJ = $(patsubst %.c,$(BUILD_DIR)%.o,$(SRC_FILES))
DEP = $(OBJ:.o=.d) DEP = $(OBJ:.o=.d)
RAYLIB_DIR = $(HOME)/Documents/Coding/raylib/build/ RAYLIB_DIR ?= $(HOME)/Documents/Coding/raylib/build/
LIB_DIRS = -L$(RAYLIB_DIR)lib LIB_DIRS = -L$(RAYLIB_DIR)lib
INCLUDE_DIRS = -I$(RAYLIB_DIR)include -I. INCLUDE_DIRS = -I$(RAYLIB_DIR)include -I.
LIBS = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 LIBS = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

15
README.md 100644
View File

@ -0,0 +1,15 @@
# FABRIK in C
Implementation of 2D FABRIK in C. Drawing and input handling are done with [raylib](https://www.raylib.com/).
## Build instruction
1. Install raylib
2. Set the RAYLIB\_DIR in the Makefile
3. `make`
## Usage
- LMB to set the root position
- `f` to toggle mouse following
- `o` and `p` to decrease and increase the length respectively
## Disclaimer
This is a toy program. Probably won't get any more serious than this.