-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
38 lines (29 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
CXX = g++
CXX_WARNINGS = -Wall -Wextra -Wno-unused-parameter
CXX_ERRORS =
CXX_STANDARD = -std=c++17
CXX_OPTIMIZATION = -O3
INC_PATH = ./dependencies -I./dependencies/glad/include
LIB_PATH = /usr/local/lib
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lglfw3
EXAMPLE_SRC_FILES = examples/hudcamera.cpp examples/simpleobjects3.cpp examples/simpletri2.cpp
EXAMPLE_OBJECTS = $(EXAMPLE_SRC_FILES:.cpp=.o)
PROGRAMS = $(EXAMPLE_SRC_FILES:examples/%.cpp=bin/%)
help:
@echo "make <target>"
@echo "\tdoxygen - generates doxygen doc files"
@echo "\texamples - build example programs"
@echo "\tinstall - copies to /usr/local/include/"
doxygen:
doxygen csci441.dox.config
install:
sudo mkdir -p /usr/local/include/CSCI441
sudo cp *.hpp /usr/local/include/CSCI441/.
examples: $(PROGRAMS)
bin/%: examples/%.cpp
@echo "Building $@..."
$(CXX) $(CXX_OPTIMIZATION) $(CXX_WARNINGS) $(CXX_ERRORS) $(CXX_STANDARD) -I$(INC_PATH) -o $@ dependencies/glad/src/gl.c $< -L$(LIB_PATH) $(LIBS)
@echo "...done!"
clean:
@rm -f $(PROGRAMS)
.PHONY: help doxygen install examples clean