0.1 Add external dependecies

This commit is contained in:
PedroEdiaz
2024-09-05 11:31:50 +00:00
parent cce685d90c
commit a2f49afbf4
7 changed files with 51 additions and 45 deletions

43
Makefile Normal file
View File

@@ -0,0 +1,43 @@
LIBGLFW=./libglfw.so
BIN = ./manigraph
OBJ = \
src/window.o \
src/matrix.o \
src/shader.o \
src/color.o \
src/mesh.o \
src/main.o
LIB = \
$(LIBGLFW)
DOC = \
DESIGN.pdf
CFLAGS= \
-I./ext/cglm/include \
-I./ext/glfw/include \
-Wall -Wno-unused-function -std=c89
all: $(DOC) $(BIN) $(LIB)
$(BIN): $(OBJ) $(LIB)
$(CC) -lGL -lglfw -L. -o $(BIN) $(OBJ)
$(LIBGLFW):
$(CC) -fPIC -shared -D_GLFW_X11 -D_GLFW_BUILD_DLL ./ext/glfw/src/*.c -o $@
run:
LD_LIBRARY_PATH=. $(BIN)
clean:
rm $(OBJ) $(DOC) $(LIB) $(BIN)
.SUFFIXES: .ms .pdf .c .o
.ms.pdf:
cat $< | sed -e "s/^\s*//g" -e "/^$$/d" | groff -Tpdf -fC -ms > $@
.c.o:
$(CC) $(CFLAGS) $< -c -o $@