Add a gitattributes file
[opengl.git] / Makefile
index 98f6c27a9400483d0295fd7443136da27943e7cb..fe9ca798e5649bb34c02c641a02d2f91927b6067 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,16 @@
-all: main
+all: bin/main
 
-main:
-       clang++ -g --std=c++17 *.cpp *.mm -L../assimp/lib -lassimp -I../assimp/include -framework OpenGL -framework glut -framework CoreGraphics -framework CoreFoundation -framework Cocoa -framework ImageIO -lglew -o bin/main
+CXX_FLAGS := -g --std=c++17 -march=native -Wall
+
+bin/main: model.o material.o image.o skybox.o program.o ik.o main.o util.o ui.o blendshapes.o
+       clang++ $(CXX_FLAGS) $^ \
+               -I/usr/local/include -L/usr/local/lib \
+               -lassimp \
+               -framework Cocoa \
+               -framework OpenGL -framework glut -framework CoreGraphics -framework CoreFoundation -framework ImageIO -lglew -o $@
        ctags *.cpp
+
+ui.o: ui.mm ui.hpp
+       clang++ -g -march=native -Wall -I/usr/local/include -c $< -o $@
+%.o: %.cpp
+       clang++ $(CXX_FLAGS) -I/usr/local/include -c $< -o $@