0.1 Add external dependecies
This commit is contained in:
43
Makefile
Normal file
43
Makefile
Normal 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 $@
|
||||
Reference in New Issue
Block a user