Last change
on this file since 0065962 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
|
Rev | Line | |
---|
[fccd588] | 1 | OS = $(shell uname)
|
---|
[2e5aa0c] | 2 | CC = g++
|
---|
| 3 | FLAGS = -Wall
|
---|
[af116c0] | 4 | DEPENDENCIES = common/texture.o common/controls.o common/shader.o
|
---|
[2e5aa0c] | 5 |
|
---|
[fccd588] | 6 | ifeq ($(OS),Darwin)
|
---|
| 7 | LIB_FLAGS = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw3 -lglew
|
---|
| 8 | endif
|
---|
| 9 | ifeq ($(OS),Linux)
|
---|
| 10 | LIB_FLAGS = -lGL -lglut -lGLEW `pkg-config glfw3 --static --cflags --libs`
|
---|
| 11 | endif
|
---|
| 12 |
|
---|
[2e5aa0c] | 13 | graphics_engine : main.cpp $(DEPENDENCIES)
|
---|
| 14 | $(CC) -o $@ $+ $(FLAGS) $(LIB_FLAGS)
|
---|
| 15 |
|
---|
| 16 | %.o : %.cpp
|
---|
| 17 | $(CC) -c -o $@ $? $(FLAGS)
|
---|
| 18 |
|
---|
| 19 | clean:
|
---|
[af116c0] | 20 | rm -f *.o
|
---|
| 21 | rm -f common/*.o
|
---|
| 22 | rm -f graphics_engine
|
---|
Note:
See
TracBrowser
for help on using the repository browser.