-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.osx
41 lines (32 loc) · 1.11 KB
/
Makefile.osx
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
39
40
41
#
# 'make depend' uses makedepend to automatically generate dependencies
# (dependencies are added to end of Makefile)
# 'make' build executable
# 'make clean' removes all .o and executable files
#
CC := c++
CFLAGS := -Wall -g2 -O2 -std=c++11 -fno-strict-aliasing
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
INCLUDES :=
LFLAGS :=
LIBS := -framework OpenGL -framework GLUT -framework Carbon
SRCS := $(wildcard $(ROOT_DIR)/src/DGP/*.cpp) $(wildcard $(ROOT_DIR)/src/DGP/Graphics/*.cpp) $(wildcard $(ROOT_DIR)/src/*.cpp)
OBJS := $(SRCS:.cpp=.o)
MAIN := pcloud
#
# The following part of the makefile is generic; it can be used to
# build any executable just by changing the definitions above and by
# deleting dependencies appended to the file from 'make depend'
#
.PHONY: depend clean
all: $(MAIN)
@echo Compilation finished
$(MAIN): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
$(RM) $(OBJS) *~ $(MAIN)
depend: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it