source: network-game/graphics_library/makefile

Last change on this file was fccd588, checked in by dportnoy15 <dmitry.portnoy@…>, 6 years ago

Make the graphics library project compile successfully on a Mac

  • Property mode set to 100644
File size: 521 bytes
Line 
1OS = $(shell uname)
2CC = g++
3FLAGS = -Wall
4DEPENDENCIES = common/texture.o common/controls.o common/shader.o
5
6ifeq ($(OS),Darwin)
7 LIB_FLAGS = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw3 -lglew
8endif
9ifeq ($(OS),Linux)
10 LIB_FLAGS = -lGL -lglut -lGLEW `pkg-config glfw3 --static --cflags --libs`
11endif
12
13graphics_engine : main.cpp $(DEPENDENCIES)
14 $(CC) -o $@ $+ $(FLAGS) $(LIB_FLAGS)
15
16%.o : %.cpp
17 $(CC) -c -o $@ $? $(FLAGS)
18
19clean:
20 rm -f *.o
21 rm -f common/*.o
22 rm -f graphics_engine
Note: See TracBrowser for help on using the repository browser.