X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=Makefile;h=42ebf39a4decb5882ac181c406f8193a24f2628b;hp=98f6c27a9400483d0295fd7443136da27943e7cb;hb=ceae87033f199ea0288399b5876fa4d1451eae3e;hpb=be8759aec179d6d7bed58732134673870c596b4f diff --git a/Makefile b/Makefile index 98f6c27..42ebf39 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ -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 + +bin/main: model.o material.o image.o skybox.o program.o main.cpp + clang++ $(CXX_FLAGS) $^ \ + -I/usr/local/include -L/usr/local/lib \ + -lassimp \ + -framework OpenGL -framework glut -framework CoreGraphics -framework CoreFoundation -framework ImageIO -lglew -o $@ ctags *.cpp + +%.o: %.cpp + clang++ $(CXX_FLAGS) -I/usr/local/include -c $< -o $@