0.1 Add external dependecies
This commit is contained in:
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[submodule "ext/cglm"]
|
||||||
|
path = ext/cglm
|
||||||
|
url = https://github.com/recp/cglm
|
||||||
|
[submodule "ext/glfw"]
|
||||||
|
path = ext/glfw
|
||||||
|
url = https://github.com/glfw/glfw
|
||||||
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 $@
|
||||||
14
doc/Makefile
14
doc/Makefile
@@ -1,14 +0,0 @@
|
|||||||
OBJ = \
|
|
||||||
DESIGN.pdf
|
|
||||||
|
|
||||||
all: $(OBJ)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm $(OBJ)
|
|
||||||
|
|
||||||
.SUFFIXES: .ms .pdf
|
|
||||||
|
|
||||||
.ms.pdf:
|
|
||||||
cat $< | sed -e "s/^\s*//g" -e "/^$$/d" | groff -Tpdf -fC -ms > $@
|
|
||||||
|
|
||||||
|
|
||||||
1
ext/cglm
Submodule
1
ext/cglm
Submodule
Submodule ext/cglm added at c12f318fab
1
ext/glfw
Submodule
1
ext/glfw
Submodule
Submodule ext/glfw added at b35641f4a3
31
src/Makefile
31
src/Makefile
@@ -1,31 +0,0 @@
|
|||||||
BIN = ./manigraph
|
|
||||||
LIBGLFW=./libglfw.so
|
|
||||||
|
|
||||||
LIB= $(LIBGLFW)
|
|
||||||
|
|
||||||
OBJ = \
|
|
||||||
window.o \
|
|
||||||
matrix.o \
|
|
||||||
shader.o \
|
|
||||||
color.o \
|
|
||||||
mesh.o \
|
|
||||||
main.o
|
|
||||||
|
|
||||||
CFLAGS= \
|
|
||||||
-I../ext/cglm/include \
|
|
||||||
-I../ext/glfw/include \
|
|
||||||
-Wall -Wno-unused-function -std=c89
|
|
||||||
|
|
||||||
|
|
||||||
$(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 $(BIN) $(OBJ) $(LIB)
|
|
||||||
Reference in New Issue
Block a user